Grant <grant@xactcommerce.com> schreef:
>However, the last time i checked, NULL does not equal to 1, 2, 3, or
>anything else besides NULL. Thats why I'm confused as to why SELECT column
>FROM table WHERE column != 1 also excludes NULL, because 1 does NOT have the
>same value as NULL.
NULL is unknown. Therefore, it is unknown if NULL equals 1, and it is
also unknown if NULL does not equal 1.
NULL = 1 --> NULL
NULL != 1 --> NULL
That's why SQL has the special operator IS NULL and IS NOT NULL (or
NOT IS NULL, I allways forget which one).
--
Vriendelijke groet,
René Pijlman <rpijlman@spamcop.net>
Wat wil jij leren?
http://www.leren.nl/