Order by provided IDs?

Поиск
Список
Период
Сортировка
От Mark Kelly
Тема Order by provided IDs?
Дата
Msg-id 201007141903.25271.pgsql@wastedtimes.net
обсуждение исходный текст
Ответы Re: Order by provided IDs?  (Thomas Kellerer <spam_eater@gmx.net>)
Список pgsql-novice
Hi.

If my query is:

SELECT art_id, art_headline, art_date
FROM article
WHERE art_id IN (357, 344, 120, 258, 369, 195, 343, 370);

can I ask Postgres to return the rows in the order of the IDs in the IN
clause? They are in a specific order defined outside the database.

Thanks,

Mark

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

Предыдущее
От: Greg
Дата:
Сообщение: Re: Extended Query Protocol Question
Следующее
От: Thomas Kellerer
Дата:
Сообщение: Re: Order by provided IDs?