QuestionQ239

VerifiedUsing Conversion Functions and Conditional Expressions

Examine the following query:

SELECT INTERVAL ‘100’ MONTH DURATION FROM DUAL;  

What is the result?

Explanation

An INTERVAL ... MONTH literal uses a default leading-field precision of 2. Since 100 requires three digits, it exceeds that precision and Oracle returns an error. Specifying MONTH(3) would be required to represent 100 months. Oracle Database documentation: Data Types, Operators, and Expressions

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!