NULLIF¶
NULLIF compares two expressions. If they are equal, it returns NULL; otherwise, it returns the first expression.
Syntax¶
Examples¶
Return NULL when both expressions are equal:
Return the first expression when the two expressions are different:
This returns hello.
Notes¶
NULLIF requires exactly two arguments.