From: Dan Nelson Date: September 12 2002 6:56pm Subject: Re: Vaibhav Difference between amount <> null and amount is not null List-Archive: http://lists.mysql.com/mysql/119413 Message-Id: <20020912185658.GC42486@dan.emsphone.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 dnelson@stripped