Help with sorting (ie. ORDER BY expression)

Поиск
Список
Период
Сортировка
От Reuben D. Budiardja
Тема Help with sorting (ie. ORDER BY expression)
Дата
Msg-id 200502051725.06680.techlist@voyager.phys.utk.edu
обсуждение исходный текст
Ответы Re: Help with sorting (ie. ORDER BY expression)  (Jonel Rienton <jonel@road14.com>)
Re: Help with sorting (ie. ORDER BY expression)  (Bruno Wolff III <bruno@wolff.to>)
Re: Help with sorting (ie. ORDER BY expression)  (Jonel Rienton <jrienton@mac.com>)
Список pgsql-general
Hello,
I am running postgres-7.3. I have a query like this:

SELECT question_id, question_text
FROM quiz_table
WHERE question_id IN (2,10,3,6,4,5);

But I want the output to be sorted in the way I give the question_id,
something like:

SELECT question_id, question_text
FROM quiz_table
WHERE question_id IN (2,10,3,6,4,5)
ORDER BY question_id (2,10,3,6,4,5)

Is there any way I can do that, so that the output of the query is

question_id, text
2            ...
10
3
6
4
5

Thanks for any help.

RDB

--
Reuben D. Budiardja
Dept. Physics and Astronomy
University of Tennesse, Knoxville, TN

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

Предыдущее
От: Bjørn T Johansen
Дата:
Сообщение: Error in trigger after upgrading to 8.0.1?
Следующее
От: "Andrey V. Semyonov"
Дата:
Сообщение: Re: Error in trigger after upgrading to 8.0.1?