NULLIF
Last updated
Last updated
Returns a null value if the two specified expressions are equal. (NULLIF in Transact-SQL).
NULLIF ( check_expression , replacement_value )
Code:
SELECT NULLIF(6,9) AS RESULT1, NULLIF(5,5) AS RESULT2;
Result:
+-------+-------+
|RESULT1|RESULT2|
+-------+-------+
|6 |null |
+-------+-------+