UNION and ORDER BY

Поиск
Список
Период
Сортировка
От Cool Screen
Тема UNION and ORDER BY
Дата
Msg-id 20021107202125.13241.qmail@web40603.mail.yahoo.com
обсуждение исходный текст
Ответы Re: UNION and ORDER BY  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
With:

(select *
from table1
where col1=1
order by name)
union
(select *
from table1
where col1=2
order by random())

UNION apparently reorders all the rows of the result
in their natural order (sequence in which they where
inserted). Is there a way to have the first part of
the results ordered by name, and the second part by random()?

__________________________________________________
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2

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

Предыдущее
От: Doug McNaught
Дата:
Сообщение: Re: SPI_????
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: OT: mailing list delays