Multiple choice

What will be the result of the given query? SELECT NULLIF(4,4) from dual

  1. 4

  2. NULL

  3. 1

  4. NONE

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

NULLIF returns NULL when both arguments are equal, otherwise returns the first argument. Since NULLIF(4,4) has equal arguments (4 = 4), it returns NULL. This is useful for preventing divide-by-zero errors and conditional NULL generation.