Here is how to do a select where a column have NULL as the stored value.
SELECT * FROM SomeTable WHERE SomeColumn IS NULL |
Equals sign does not work for null, trying to use the equals operator generates the result Unknown (it is not true nor false)
IF i = NULL THEN SELECT 'Result is True' ELSEIF NOT(i = NULL) THEN SELECT 'Result is False' ELSE SELECT 'Result is Unknown'; --This will end with Result is Unknown |
This is based on the fact that null was introduced to represent “missing information and inapplicable information” in the database model and based on that statement using equals null was not implemented.