Oracle Database SQL — Question 14
Which two will execute successfully? (Choose two.)
Answer options
- A. SELECT COALESCE(0, SYSDATE) FROM DUAL;
- B. SELECT NVL('DATE', SYSDATZ) FROM DUAL;
- C. SELECT COALESCE('DATE', SYSDATE) FROM DUAL;
- D. SELECT NVL('DATE', 200) FROM (SELECT NULL AS "DATE" FROM DUAL);
- E. SELECT COALESCE('DATE', SYSDATE) FRCM (SELECT NULL AS "DATE" FROM DUAL);
Correct answer: B, D
Explanation
Option B will execute successfully because NVL can handle a string and a NULL value, but SYSDATZ is a typo for SYSDATE. Option D is valid as it uses NVL correctly with a subquery returning NULL. The other options contain errors such as incorrect function usage or syntax mistakes that prevent successful execution.