Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 2301347595B for ; Tue, 14 May 2002 07:47:50 -0400 (EDT) Received: from aragorn.reaumur.absolight.net (ATuileries-113-2-1-180.abo.wanadoo.fr [80.11.216.180]) by postgresql.org (Postfix) with ESMTP id 33450475941 for ; Tue, 14 May 2002 07:47:49 -0400 (EDT) Received: from andromede.reaumur.absolight.net (andromede.reaumur.absolight.net [212.43.217.61]) by aragorn.reaumur.absolight.net (Postfix) with ESMTP id 2EA6BD70E for ; Tue, 14 May 2002 13:47:51 +0200 (CEST) Date: Tue, 14 May 2002 13:49:41 +0200 From: Mathieu Arnold To: pgsql-sql@postgresql.org Subject: order by Message-ID: <1713675304.1021384181@andromede.reaumur.absolight.net> X-Mailer: Mulberry/2.2.1 (Win32) X-wazaaa: True, true MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Archive-Number: 200205/128 X-Sequence-Number: 7764 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