Re: ORDER BY

Поиск
Список
Период
Сортировка
От Gurjeet Singh
Тема Re: ORDER BY
Дата
Msg-id 65937bea0611201905v3f5adf02r254d82cc6d26f641@mail.gmail.com
обсуждение исходный текст
Ответ на Re: ORDER BY  (Harald Fuchs <hf1110x@protecting.net>)
Список pgsql-general
On 16 Nov 2006 11:04:15 +0100, Harald Fuchs <hf1110x@protecting.net> wrote:
Why so complicated?

SELECT whatever FROM foo ORDER BY name = 'Other', name

This is by far the simplest (and intelligent) of them all. And it will use a single scan of the underlying table (or index, if used), so should prove to be faster than the other UNION schemes.

Another tweak: If possible, use the integer column (ID) instead of the Name column.

Regards,

--
gurjeet[.singh]@EnterpriseDB.com
singh.gurjeet@{ gmail | hotmail | yahoo }.com

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

Предыдущее
От: "Frank Millman"
Дата:
Сообщение: Re: pg_get_serial_sequence is inconsistent
Следующее
От: "A. Kretschmer"
Дата:
Сообщение: Re: Extract between year *and* month