description |
---|
Compares two expressions. If the values in each expression are equal, returns NULL and, if they are not equal, returns the value of the first expression. |
- expression: The expressions can be any data type, however all the expressions contained in the argument must be of the same type.
Examples
{% code title="NULLIF example" %}
SELECT NULLIF(user_id, customer_id)
-- user_id
{% endcode %}