NULLIF() compares two expressions. If they are equal, it returns NULL. Otherwise, it returns the first expression. : NULLIF « Conversion Functions « Oracle PL / SQL






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

1.select nullif( 1, 1 )
2.select nullif( 1, null )