QuestionQ245

VerifiedUsing Conversion Functions and Conditional Expressions

The INVOICE table contains a QTY_SOLD column with data type NUMBER and an INVOICE_DATE column with data type DATE.

NLS_DATE_FORMAT is set to DD-MON-RR.

Which two statements are true about data-type conversions involving these columns in query expressions?

Choose two
Explanation

Oracle implicitly converts a character value to DATE when it is compared with a DATE value. Oracle’s non-exact string-to-date rules permit MON to match MONTH and RR to match RRRR, so 15-march-2019 is implicitly converted successfully under DD-MON-RR. Oracle also implicitly converts character values to NUMBER when they are compared with a NUMBER value, including the bounds of a BETWEEN condition.

Learn more

Community Discussion

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