order by

Поиск
Список
Период
Сортировка
От Mathieu Arnold
Тема order by
Дата
Msg-id 1713675304.1021384181@andromede.reaumur.absolight.net
обсуждение исходный текст
Ответы Re: order by
Re: order by
Re: order by
Re: order by
Список pgsql-sql
Hi

I have :

table a (int, varchar, int)

1 | one   | 1
2 | two   | 3
3 | three | 2
4 | four  | 3
5 | five  | 2

And I would like to select it and sort it so that the 3rd field is first 2, 
then 1 and then 3. so that the result should be :

1 | one   | 1
3 | three | 2
5 | five  | 2
2 | two   | 3
4 | four  | 3

How could I do that ?

-- 
Mathieu Arnold


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Various PostgreSQL questions
Следующее
От: Christoph Haller
Дата:
Сообщение: Re: order by