NULLIF
Overview
Compares two expressions and returns NULL if they are equal; otherwise returns the value of the first expression. Commonly used to avoid division-by-zero errors or to replace a specific value with NULL.
Syntax
Parameters
<expr1>: The first expression; this is the value that gets replaced with NULL when the two expressions are equal.<expr2>: The second expression, used for comparison.
The two parameters must have compatible types.
