Nulls and Comparison Operators
If either operand of a comparison operator is null, then the result is unknown and an error is returned to the requestor. The following examples indicate this behavior.
WHEN the expression is … |
THEN the result is … |
AND this error message returns to the requestor … |
5 = NULL |
Unknown |
3731 |
5 <> NULL |
||
NULL = NULL |
||
NULL <> NULL |
||
5 = NULL + 5 |
Note that if the argument of the NOT operator is unknown, the result is also unknown. This evaluation translates to FALSE as a final boolean result.