Mega Code Archive

 
Categories / MySQL / Regular Expression
 

SQL patterns do not match NULL values This is true both for LIKE and NOT LIKE

mysql> mysql> mysql> SELECT NULL LIKE '%', NULL NOT LIKE '%'; +---------------+-------------------+ | NULL LIKE '%' | NULL NOT LIKE '%' | +---------------+-------------------+ |          NULL |              NULL | +---------------+-------------------+ 1 row in set (0.00 sec) mysql> mysql>