Re: union query format

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: union query format
Дата
Msg-id web-1386026@davinci.ethosmedia.com
обсуждение исходный текст
Ответ на union query format  (Robert Wynter <rgwynter@rci.rogers.com>)
Список pgsql-sql
On Fri, 26 Apr 2002 15:46:21 -0400Robert Wynter <rgwynter@rci.rogers.com> wrote:
> Hi Josh,
> Thanks for the help.
> 
> Question, How do I format in a union query. Is there a SELECT SQL
> code I
> could use. I've been trying to find internet code examples to find
> that out.

Just like you would in a regular query.  

SELECT to_char(sub_date, 'YYYY-MM-DD') as entry, adv, etc ....
UNION ALL
SELECT mps, adv, etc .....

(I generally use UNION ALL because it doesn't require the DB to test
for uniqueness and thus runs faster in cases where I expect all rows to
be unique anyway).

-Josh




В списке pgsql-sql по дате отправления:

Предыдущее
От: "Josh Berkus"
Дата:
Сообщение: Wierd query behaviour
Следующее
От: Ron Peterson
Дата:
Сообщение: Re: Connection authentication