NULL means 'a missing unknown value' : NULL « Data Types « MySQL Tutorial






The NULL value means "no data."

NULL can be written in any lettercase.

For operations performed with LOAD DATA INFILE or SELECT ... INTO OUTFILE, NULL is represented by the \N sequence.

To test for NULL, you cannot use the arithmetic comparison operators such as =, <, or <>.

mysql>
mysql> SELECT 1 = NULL, 1 <> NULL, 1 < NULL, 1 > NULL;
+----------+-----------+----------+----------+
| 1 = NULL | 1 <> NULL | 1 < NULL | 1 > NULL |
+----------+-----------+----------+----------+
|     NULL |      NULL |     NULL |     NULL |
+----------+-----------+----------+----------+
1 row in set (0.00 sec)

mysql>








10.18.NULL
10.18.1.NULL means 'a missing unknown value'
10.18.2.Use the IS NULL and IS NOT NULL operators for NULL value
10.18.3.In MySQL, 0 or NULL means false and anything else means true.
10.18.4.Two NULL values are regarded as equal in a GROUP BY
10.18.5.NULL values are presented first if you do ORDER BY ... ASC
10.18.6.NULL values are presented last if you do ORDER BY ... DESC
10.18.7.Use 0 and '' is not NULL