NULLIF - SQL Built-in Function In Oracle

south-man(32)
Published in
#sql
Words
60
Reading
1 min
Listen
Play
9y

NULLIF (exp1, exp2)

  • NULL if exp1 and exp2 are equal, otherwise exp1
  • CASE WHEN expr1 = expr2 THEN NULL ELSE expr1 END
  • If the numerator is zero in division, an error occurs. Use of NULLIF is convenient. num1 / NULLIF (num2, 0): If num2 is 0, the denominator becomes NULL and no error occurs. The result of division is NULL.
NULLIF - SQL Built-in Function In Oracle | Ecency