Oracle Database SQL — Question 46
Which two queries execute successfully? (Choose two.)
Answer options
- A. SELECT NULLIF (NULL, 100) FROM DUAL;
- B. SELECT NULLIF (100, ‘A’) FROM DUAL;
- C. SELECT NULLIF (100, 100) FROM DUAL;
- D. SELECT COALESCE (100, NULL, 200) FROM DUAL;
- E. SELECT COALESCE (100, ‘A’) FROM DUAL;
Correct answer: C, D
Explanation
The correct answers are C and D because both queries utilize valid SQL syntax and function logic. Query C evaluates to NULLIF(100, 100), which returns NULL, while query D returns the first non-null value in COALESCE, which is 100. The other options either involve invalid data types or conditions that do not yield successful execution.