QuestionQ162

VerifiedUsing Conversion Functions and Conditional Expressions

You are a database administrator at ABC.com. Carefully examine the exhibit.

Exhibit:

Question Image

Which two SQL statements execute successfully?

Choose two
Explanation

Oracle TO_CHAR accepts datetime format models such as YYYY, MON, DD, and YY for DATE values. Thus the date-to-character conversions in A and B use valid format models, and their numeric and character comparisons are valid. The TO_DATE calls in C and D omit explicit format masks, so they depend on the session default date format; the supplied strings do not match the assumed default format used in this context.

Learn more

Community Discussion

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