Multiple choice technology databases

What output will the follwing 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, otherwise returns expr3. Since the first argument is NULL, NVL2 returns the third argument NULL. The second argument 'NOT NULL' is just a string literal in this context, not the SQL keyword.