X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 48E1E3A44AF for ; Tue, 26 Oct 2004 21:20:50 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 21774-08 for ; Tue, 26 Oct 2004 20:20:38 +0000 (GMT) Received: from pimout7-ext.prodigy.net (pimout7-ext.prodigy.net [207.115.63.58]) by svr1.postgresql.org (Postfix) with ESMTP id 0674F3A448A for ; Tue, 26 Oct 2004 21:20:38 +0100 (BST) Received: from [192.168.1.207] (214.adsl.snet.net [69.177.163.214] (may be forged)) by pimout7-ext.prodigy.net (8.12.10 milter /8.12.10) with ESMTP id i9QKKa37198174 for ; Tue, 26 Oct 2004 16:20:37 -0400 Message-ID: <417EB238.1000109@kencast.com> Date: Tue, 26 Oct 2004 16:23:20 -0400 From: Wei Weng User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: How do you compare (NULL) and (non-NULL)? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200410/187 X-Sequence-Number: 19290 In the following query SELECT Parent FROM Channels ORDER BY Parent ASC; If I have a couple of (NULL)s in the field [Parent], they will be listed at the bottom of the query result. Is it because PostgreSQL considers (NULL) as the biggest value? If I run the same query under MSSQL Server 2000, I get the exact opposite result regarding the order of (NULL)s and (non-NULL) values. They are listed at the very beginning of the query result. Thanks Wei