NULLIF Function In Oracle
NULLIF is an advanced function that the Oracle database supports. It is used to compare two expressions. The NULLIF function is supported in the various versions of the Oracle/PLSQL, including, Oracle 12c, Oracle 11g, Oracle 10g and Oracle 9i.
NULLIF( expr1, expr2 )
expr1, expr2: They are used to specify the expressions to compare.
NULLIF (56, 56)
Here, the NULLIF function returns NULL since expr1 and expr2 are equal.
NULLIF (‘apple’, ‘pineapple’)
Here, the NULLIF function returns expr1 since expr1 and expr2 are not equal.