Provides an abbreviated CASE expression by comparing expressions.
Parameter |
Description |
---|---|
expression1 |
An expression to be compared. |
expression2 |
An expression to be compared. |
Data type of the first argument.
NULLIF compares the values of the two expressions.
If the first expression equals the second expression, NULLIF returns NULL.
If the first expression does not equal the second expression, or if the second expression is NULL, NULLIF returns the first expression.
CASE WHEN expression1 = expression2 THEN NULL ELSE expression1 END