hiexam
oracle · 1z0-071 · Q605 · multiple_choice · topic_1

Examine this query: SELECT INTERVAL ‘100’ MONTH DURATION FROM DUAL; What will be the output?

Examine this query: SELECT INTERVAL ‘100’ MONTH DURATION FROM DUAL; What will be the output?
  • A.an error
  • B.DURATION - ---------- +100
  • C.DURATION - ---------- +08
  • D.DURATION - ---------- +08-04
Explanation
Selected Answer: D Explanation: The given query is using an interval literal with a value of '100' and a unit of 'MONTH'. When using the interval literal syntax, the specified value represents the number of intervals of the given unit. In this case, the query is requesting an interval of 100 months. Since there are 12 months in a year, the interval '100' months is equivalent to 8 years and 4 months. The output format for intervals in Oracle is '+YY-MM', where YY represents the number of years and MM represents the number of months. Therefore, the output will be '+08-04', indicating an interval of 8 years and 4 months. The correct answer is D. +08-04.

Reference: examtopics_top_comment

Practice with progress tracking

Sign in to track wrong answers, get spaced-repetition reminders, and run timed exam mode.