Received: from mail.postgresql.org (webmail.postgresql.org [216.126.85.28]) by mail.postgresql.org (8.11.1/8.11.1) with SMTP id f0O5aH045443 for ; Wed, 24 Jan 2001 00:36:17 -0500 (EST) (envelope-from pgsql-sql-owner@postgresql.org) Received: from news.tht.net (news.hub.org [216.126.91.242]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f0N0TU087191 for ; Mon, 22 Jan 2001 19:29:30 -0500 (EST) (envelope-from news@news.tht.net) Received: (from news@localhost) by news.tht.net (8.11.1/8.11.1) id f0N0PtG43134 for pgsql-sql@postgresql.org; Mon, 22 Jan 2001 19:25:55 -0500 (EST) (envelope-from news) From: Tristan Colson X-Newsgroups: comp.databases.postgresql.sql Subject: Order By Question Date: Mon, 22 Jan 2001 16:25:52 -0800 Organization: Hub.Org Networking Services (http://www.hub.org) Lines: 11 Message-ID: <3A6CCF90.A2A35708@pacbell.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: scrappy@hub.org X-Mailer: Mozilla 4.76 [en] (Windows NT 5.0; U) X-Accept-Language: en To: pgsql-sql@postgresql.org X-Archive-Number: 200101/310 X-Sequence-Number: 980 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.