In the last episode (Sep 12), compo  guy said:
> What is the difference between the following sql queries written to
> extract tuples with the field amount having non null value:
>      select loan_number from loan where amount <> null (It returns
> an empty set)
>      select loan_number from loan where amount is not null(It
> returns the expected result).

NULL is a special value.  it can only be compared with "IS NULL" or "IS
NOT NULL".  "= NULL" and "<> NULL" always return false.

http://www.mysql.com/doc/en/Working_with_NULL.html 

-- 
        Dan Nelson
        [EMAIL PROTECTED]

---------------------------------------------------------------------
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