QuestionQ121

VerifiedRestricting and Sorting Data
  1. The orders table contains an ORDER_DATE column with the DATE data type.

The default date display format is DD-MON-RR.

Which two WHERE conditions show the correct use of conversion functions?

Choose two
Explanation

TO_DATE converts a character value such as a month-day-year literal into a DATE when the supplied format model matches that text, so it can be compared directly with a DATE column. TO_CHAR converts a DATE value into VARCHAR2 using the supplied format model, so a formatted date string can be compared with an identically formatted character literal. Applying TO_DATE to an existing DATE, or mixing formatted character values with DATE values, relies on inappropriate or implicit conversion.

Learn more

Community Discussion

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