Menguji apakah suatu nilai adalah NULL.
SELECT 1 IS NULL, 0 IS NULL, NULL IS NULL;
0, 0, 1
To work well with ODBC programs, MySQL supports the following extra features when using IS NULL:
SELECT 1 IS NULL, 0 IS NULL, NULL IS NULL;
0, 0, 1
If sql_auto_is_null variable is set to 1, then after a statement that successfully inserts an automatically generated AUTO_INCREMENT value, you can find that value by issuing a statement of the following form:
SELECT * FROM tbl_name WHERE auto_col IS NULL
If the statement returns a row, the value returned is the same as if you invoked the LAST_INSERT_ID() function. For details, including the return value after a multiple-row insert, see Section 14.15, “Information Functions”. If no AUTO_INCREMENT value was successfully inserted, the SELECT statement returns no row.
SELECT * FROM tbl_name WHERE date_column IS NULL