Received: from megazone.bigpanda.com (megazone.bigpanda.com [63.150.15.178]) by postgresql.org (Postfix) with ESMTP id 4778F476842 for ; Mon, 11 Mar 2002 12:02:08 -0500 (EST) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 6ED9CD605; Mon, 11 Mar 2002 09:02:09 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 644745BFD; Mon, 11 Mar 2002 09:02:09 -0800 (PST) Date: Mon, 11 Mar 2002 09:02:09 -0800 (PST) From: Stephan Szabo To: Bhuvan A Cc: Subject: Re: In-Reply-To: Message-ID: <20020311085824.C45259-100000@megazone23.bigpanda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200203/63 X-Sequence-Number: 3311 On Mon, 11 Mar 2002, Bhuvan A wrote: > > If you compare a NULL with anything you don't get a true value whether > > you're comparing with =, !=, <, >, etc... That's how it's defined to > > behave. > > where did you get this definition of behaviour!? is it applicable only to > postgres or ..? its quite strange yaar! It makes sense if you think of NULL as an unknown value. You don't know if this unknown value is different from any particular value (even another NULL). NULLs are one of the ugliest parts of SQL. In case you're wondering for SQL92 (at least the draft I have), the section is 8.2 , General Rules 1. 1) Let X and Y be any two corresponding s. Let XV and YV be the values represented by X and Y, respectively. Case: a) If XV or YV is the null value, then "X Y" is un- known.