From: | Phil Rhoades <phil(at)pricom(dot)com(dot)au> |
---|---|
To: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: A select DISTINCT query? |
Date: | 2008-01-27 16:21:28 |
Message-ID: | 1201450888.28880.81.camel@prix.pricom.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Pavel,
You didn't read my note properly - your query gives:
1
2
3
4
5
I want:
1
2
4
5
Phil.
On Sun, 2008-01-27 at 15:10 +0100, Pavel Stehule wrote:
> Hello
>
> try
>
> SELECT DISTINCT col FROM table
>
> Pavel
>
> On 27/01/2008, Phil Rhoades <phil(at)pricom(dot)com(dot)au> wrote:
> > People,
> >
> > I want to select from a table ONLY unique records ie if a column has
> > values:
> >
> > 1
> > 2
> > 3
> > 3
> > 4
> > 5
> >
> > I want ONLY these records returned:
> >
> > 1
> > 2
> > 4
> > 5
> >
> > Thanks,
> >
> > Phil.
> > --
> > Philip Rhoades
> >
> > Pricom Pty Limited (ACN 003 252 275 ABN 91 003 252 275)
> > GPO Box 3411
> > Sydney NSW 2001
> > Australia
> > Fax: +61:(0)2-8221-9599
> > E-mail: phil(at)pricom(dot)com(dot)au
> >
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 3: Have you checked our extensive FAQ?
> >
> > http://www.postgresql.org/docs/faq
> >
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
>
--
Philip Rhoades
Pricom Pty Limited (ACN 003 252 275 ABN 91 003 252 275)
GPO Box 3411
Sydney NSW 2001
Australia
Fax: +61:(0)2-8221-9599
E-mail: phil(at)pricom(dot)com(dot)au
From | Date | Subject | |
---|---|---|---|
Next Message | Phil Rhoades | 2008-01-27 16:32:18 | Re: A select DISTINCT query? |
Previous Message | Tino Wildenhain | 2008-01-27 14:16:30 | Re: A select DISTINCT query? |