Oracle Database SQL — Question 35
Examine this query:
SELECT INTERVAL ‘100’ MONTH DURATION FROM DUAL;
What will be the output?
Answer options
- A. an error
- B. DURATION - ---------- +100
- C. DURATION - ---------- +08
- D. DURATION - ---------- +08-04
Correct answer: D
Explanation
The correct answer is D because the INTERVAL function with '100' MONTHs converts the input into a format that includes years and months, which results in +08-04 (8 years and 4 months). Option A is incorrect as there is no syntax error in the query. Options B and C provide incorrect representations of the output format.