Re: UNION and ORDER BY

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: UNION and ORDER BY
Дата
Msg-id 28930.1036702665@sss.pgh.pa.us
обсуждение исходный текст
Ответ на UNION and ORDER BY  (Cool Screen <cool_screen_name90001@yahoo.com>)
Список pgsql-general
Cool Screen <cool_screen_name90001@yahoo.com> writes:
> UNION apparently reorders all the rows of the result
> in their natural order

No.  It sorts them so it can eliminate duplicate rows, as per spec.
Try UNION ALL if you just want the two subselect results concatenated.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Vacuum full?
Следующее
От: "scott.marlowe"
Дата:
Сообщение: Re: PostgreSQL on Linux and Solaris comparison