Re: select from table with unique values - Mailing list pgsql-hackers

From Christopher Kings-Lynne
Subject Re: select from table with unique values
Date
Msg-id 3FEF78E1.9020100@familyhealth.com.au
Whole thread Raw
In response to select from table with unique values  (ivan <iv@psycho.pl>)
List pgsql-hackers
> how to do select from same table to get only unique values from same
> column(s) ?

SELECT DISTINCT a, b FROM tab;

or even:

SELECT DISTINCT ON (a) a, b FROM tab;

Chris


pgsql-hackers by date:

Previous
From: ivan
Date:
Subject: select from table with unique values
Next
From: Andrew Dunstan
Date:
Subject: Re: Use of 'cp -r' in CREATE DATABASE