Answer the question
In order to leave comments, you need to log in
MySQL WHERE NOT IN skip NULL?
The table table has a status field which can be NULL.
SELECT * FROM `table` WHERE `status` NOT IN ('cancel', 'finished', 'failed');
Answer the question
In order to leave comments, you need to log in
This is not a bug. Comparison with NULL gives undefined result, so you can't check equality/inequality with NULL by normal means
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question