Order By Question - Mailing list pgsql-sql

From Tristan Colson
Subject Order By Question
Date
Msg-id 3A6CCF90.A2A35708@pacbell.net
Whole thread Raw
List pgsql-sql
This seems like the answer must be pretty easy, but I can't think of it:

In the following statement:

select field1 from my_table where field2 in (3, 1, 2);

How can I modify this statement so that the record are returned in the
order of having field2 = 3, then field2 = 1, then field2 = 2.
As it stands, I am getting them returned in the order of the value of
field1.



pgsql-sql by date:

Previous
From: Michael Davis
Date:
Subject: RE: DATE
Next
From: Ian Harding
Date:
Subject: Re: Order By Question