The reason behind this is that when we use NULL with comparison operators like "=", "" etc., we do not receive anything from the comparison to any meaningful results. Consider the following example to demonstrate this concept -
mysql> Select 10 = NULL, 10< NULL, 10<>NULL; +-----------+----------+----------+ | 10 = NULL | 10< NULL | 10<>NULL | +-----------+----------+----------+ | NULL | NULL | NULL | +-----------+----------+----------+ 1 row in set (0.07 sec)
The above result set does not make sense in any sense.
The above is the detailed content of Why can't we use arithmetic operators like '=', '' etc. with NULL in MySQL?. For more information, please follow other related articles on the PHP Chinese website!