Poison

MySQL

NULL

  • Conceptually, NULL means “a missing unknown value” and it is treated somewhat differently from other values.
  • In SQL, the NULL value is never true in comparison to any other value, even NULL. An expression that contains NULL always produces a NULL value unless otherwise indicated in the documentation for the operators and functions involved in the expression.
  • You can add an index on a column that can have NULL values if you are using the MyISAM, InnoDB, or MEMORY storage engine. Otherwise, you must declare an indexed column NOT NULL, and you cannot insert NULL into the column.
  • When using DISTINCT, GROUP BY, or ORDER BY, all NULL values are regarded as equal.

Working with NULL Values
Problems with NULL Values