Skip site navigation (1) Skip section navigation (2)

Re: a wierd query

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: sad <sad(at)bankir(dot)ru>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: a wierd query
Date: 2004-05-14 05:24:06
Message-ID: 20040513222259.D23568@megazone.bigpanda.com (view raw or flat)
Thread:
Lists: pgsql-sql
On Fri, 14 May 2004, sad wrote:

> On Thursday 13 May 2004 19:27, you wrote:
> > sad wrote:
> > > select distinct a as F from table
> > > union
> > > select distinct b as F from table;
> >
> > Note that UNION only returns the unique values of the union
> > You can get repeated values by using UNION ALL.
>
> read the original problem
> look at the DISTINCT clause in my query
> and think again

What about the fact that union already removes duplicates?


In response to

pgsql-sql by date

Next:From: Greg StarkDate: 2004-05-14 05:26:09
Subject: Re: isolation level
Previous:From: sadDate: 2004-05-14 03:45:48
Subject: Re: a wierd query

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group