What does delete from table where NULL = NULL
mean?
Recap:
mysql> select null = null, null <> null, null is null, null = 1, null <> 1;
+-------------+--------------+--------------+----------+-----------+
| null = null | null <> null | null is null | null = 1 | null <> 1 |
+-------------+--------------+--------------+----------+-----------+
| NULL | NULL | 1 | NULL | NULL |
+-------------+--------------+--------------+----------+-----------+
1 row in set (0.00 sec)
mysql> select count(*) from table;
+----------+
| count(*) |
+----------+
| 10 |
+----------+
1 row in set (0.33 sec)
mysql> select * from table where null;
Empty set (0.00 sec)
Meaning, if a condition evaluates to null it is considered false by MySql so delete from table where NULL = NULL
will in fact delete nothing.
NULL is a special beast as noted by Codd