NULLIF() compares two expressions. If they are equal, it returns NULL. Otherwise, it returns the first expression.
SQL>
Syntax: NULLIF( <expression1>,<expression2>)
SQL>
SQL> SELECT
2 NULLIF('ABC','ABC') equal,
3 NULLIF ('ABC','DEF') diff from dual;
EQU DIF
--- ---
ABC
Related examples in the same category