Be cafefull with NULL in mysql

Be careful with NULL in mysql

  1. NULL

    In SQL, the NULL value is never true in comparison to any other value, even NULL.
    -Problems with NULL Values

  2. IN, Not IN and All

    When used with a subquery, the word IN is an alias for = ANY.
    NOT IN is not an alias for <> ANY, but for <> ALL.
    -Subqueries with ANY, IN, or SOME

    The word ALL, which must follow a comparison operator, means “return TRUE if the comparison is TRUE for ALL of the values in the column that the subquery returns.”
    -Subqueries with ALL

Here’s a bug(maybe) about NOT IN: danger about mysql’s IN and NOT IN