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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-sql by date

  From Date Subject
Next Message Greg Stark 2004-05-14 05:26:09 Re: isolation level
Previous Message sad 2004-05-14 03:45:48 Re: a wierd query