Showing posts with label SELECT DISTINCT. Show all posts
Showing posts with label SELECT DISTINCT. Show all posts

Thursday, November 5, 2009

How to SELECT DISTINCT multiple columns in postgreSQL?

This is helpful when you wanted to get multiple columns and also needed a column to be distinct

table columns
id
firstname
middlename
address
age
gender


here is the query....


SELECT 
DISTINCT 
ON(firstname)firstname, 
lastname, 
middlename,
address,
age,
gender;


hope that little code helps. : )

Feeds

Sonic Run: Internet Search Engine javascript, coldfusion, programming, simple programming teckniques, css, html Webfeed (RSS/ATOM/RDF) submitted to http://www.feeds4all.nl Web Development & Design Blogs DigNow.net

Search Engine Optimization and SEO Tools
javascript, coldfusion, programming, simple programming teckniques, css, html