Received: from danbo.digsys.bg (root@danbo.digsys.bg [192.92.129.10]) by hub.org (8.9.3/8.9.3) with ESMTP id GAA81763 for ; Sun, 5 Dec 1999 06:53:59 -0500 (EST) (envelope-from genov@lorna.digsys.bg) Received: from lorna.digsys.bg (root@lorna.digsys.bg [193.68.6.15]) by danbo.digsys.bg (8.9.0/8.9.0) with ESMTP id NAA21401; Sun, 5 Dec 1999 13:53:53 +0200 (EET) Received: from lorna.digsys.bg (genov@localhost.digsys.bg [127.0.0.1]) by lorna.digsys.bg (8.9.0/8.9.0) with ESMTP id NAA24720; Sun, 5 Dec 1999 13:53:50 +0200 (EET) Message-Id: <199912051153.NAA24720@lorna.digsys.bg> X-Mailer: exmh version 2.0.2 2/24/98 To: Dirk Lutzebaeck cc: pgsql-sql@postgresql.org Subject: Re: [SQL] Howto to force NULL rows at the bottom ? In-reply-to: Your message of "Fri, 03 Dec 1999 14:57:25 +0100." <14407.52293.774116.312846@ampato.aeccom.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 05 Dec 1999 13:53:48 +0200 From: Stoyan Genov Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by hub.org id GAA81781 Hi, If you bother about the NULLs positioned at the bottom of the selection, and not how non-NULL data is ordered, you can just use ORDER BY field DESC - this will position NULLs at the bottom, ordering non-NULL data from the highest values to the lowest. Regards, Stoyan Genov > Hi, > > how can I force NULL rows at the bottom of the result list in an > ordered SELECT? > > with ORDER BY I get > > NULL > Peter > Jane > > but I want > > Peter > Jane > NULL > > -- > Dirk > > ************ >