Multiple choice technology databases

SELECT NVL2(null,'second','third') FROM DUAL ;

  1. second

  2. third

  3. null

  4. error

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

NVL2 returns the second argument when the first is NOT NULL, and the third argument when the first IS NULL. Since the first argument is null, NVL2 returns 'third' (the else clause).