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 <comparison predicate>, General Rules 1.

         1) Let X and Y be any two corresponding <row value constructor
            element>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 <comp op> Y" is un-
              known.



---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly

Reply via email to