Multiple choice

What output will the given statement produce? Select NVL2(NULL,'NOT NULL', NULL) from dual;

  1. NULL

  2. NOT NULL

  3. Function NVL2 is not defined.

  4. None of the above

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

NVL2(expr1, expr2, expr3) returns expr2 if expr1 is NOT NULL, and expr3 if expr1 IS NULL. Since the first argument is NULL, the function returns the third argument which is NULL. Option B would be returned if the first argument were NOT NULL.