QuestionQ98

VerifiedUsing Conversion Functions and Conditional Expressions

Examine the structure and data in the CUST_TRANS table:

Question Image

Dates in the CUST_TRANS table are stored using the default date format dd-mon-rr. Which three SQL statements execute successfully?

Choose three
Explanation

Oracle implicitly converts a numeric character literal used in date arithmetic, so adding '10' to a DATE is valid. A CHAR column can be compared with another character literal, making the CUSTNO > '11' comparison valid. In non-exact date conversion, Oracle can match MON using the alternative MONTH element, so 01-JANUARY-07 is accepted under DD-MON-RR. A numeric month does not match MON, and 'A' cannot be converted to NUMBER for arithmetic.

Learn more

Community Discussion

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