SQL nullif returns the value of the first argument unless it equals the second argument—then it returns the null value.
SELECT NULLIF(int_expression, 0)
FROM ...The example returns the value of int_expression unless it contains the the value zero (0)—then it returns the SQL null value. This particular example is useful to prevent division by zero errors.
Related
Tutorials
Other conditional expressions:
Normative References
The nullif expression is defined in ISO/IEC 9075-2:2023 as mandatory feature F261-03.