SELECT * FROM classification
WHERE level1 = "FOO" AND level2 IS NULL;

IS NULL instead of = "NULL"

null is not a value, it's the abscence of value

Etienne

"Ward, Mark" wrote:
> 
> I don't know how this affects anything, but, I'm running the most recent
> version of mySQL for win98.
> 
> Why is it that an SQL statement like this (or any variation)...
> 
> SELECT * FROM classification
> WHERE level1 = "FOO" AND level2 = "NULL";
> 
> will return an empty set. I know that there should be results. The NULL
> value is screwing me up. Am I even referencing it properly?
> 
> Mark Ward
> 
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
> 
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

-- 
Etienne Marcotte
Specifications Management - Quality Control
Imperial Tobacco Ltd. - Montreal (Qc) Canada
514.932.6161 x.4001

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to