MySQL and NULL

admin

Administrator
Staff member
I have a table with 3 records. In all the records, the field "locked" is set to NULL. Therefor, when doing the SQL-Query:

Select locked from mytable;

returns:
locked
-------
NULL
NULL
NULL

Now I use "where" to select only the records "where locked=NULL" (which sould be all of them).

Select locked from mytable where locked=NULL;

Which results in an empty result set !

Why ?

Martin
 
Back
Top