Hello,
I have a query:
select * from table where del != "1";
Let's assume that I have a record where del is null (del is a single character field).
In version 3.23.22-beta I get the record returned with the above query, in version 4.1.10a I get nothing returned.
Did something change between these versions or is this a bug? I couldn't find anything specific to this on the archives.
TIA
You should get nothing returned. NULL is not a value, so it cannot be equal, *or not equal*, to anything. The result of NULL != 1 is NULL. NULL is not TRUE, so no rows where del is NULL should be returned. If 3.23.222-beta returned such rows, it was a bug in that ancient version which has since been fixed.
If you want rows where del is null, you need to
SELECT * FROM table WHERE del IS NULL;
Michael
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]