Re: a wierd query - Mailing list pgsql-sql

From Edmund Bacon
Subject Re: a wierd query
Date
Msg-id 40A393FF.3030806@onesystem.com
Whole thread Raw
In response to Re: a wierd query  (sad <sad@bankir.ru>)
Responses Re: a wierd query
List pgsql-sql
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.


-- 
Edmund Bacon <ebacon@onesystem.com>


pgsql-sql by date:

Previous
From: Stef
Date:
Subject: Re: Exceptions when 0 rows affected.
Next
From: "Jaime Casanova"
Date:
Subject: isolation level