NULLIF

Description

Returns a null value if the two specified expressions are equal. (NULLIF in Transact-SQL).

Sample Source Pattern

Syntax

NULLIF ( check_expression , replacement_value )  

Examples

Code:

IN -> SqlServer_01.sql
SELECT NULLIF(6,9) AS RESULT1, NULLIF(5,5) AS RESULT2;

Result:

+-------+-------+
|RESULT1|RESULT2|
+-------+-------+
|6      |null   |
+-------+-------+

Known Issues

No issues were found.

No related EWIs.

Last updated