Suppose a table has a column
num of type
INT and the values in that column are allowed to be
NULL. Now, provided that some rows has
num cell set to some value and it's
NULL for other rows, how do I select all the rows where
num is not equal to a specific value, including the rows where
NULL, using just one condition?
For example, if the
num value I wanted to exclude from selection was
5, I would have to use a
SELECT query with two conditions:
SELECT * FROM `table` WHERE `num` != 5 OR `num` IS NULL;
But how to make this simple retrieval using just one condition?