NULLIF
functionsupportedCore SQL functionsReturns NULL if expr1 is equal to expr2, otherwise returns expr1.
Syntax
NULLIF( <expr1> , <expr2> )
Parameters
| Name | Required | Description |
|---|---|---|
expr1 | required | Any general expression of any data type. |
expr2 | required | Any general expression that evaluates to the same data type as expr1. |
Returns
The data type of the returned value is the data type of expr1.
Collation details
- The collation specifications of all input arguments must be compatible. - The collation of the result is the same as the collation of the first input.