QuestionQ81

VerifiedUsing Conversion Functions and Conditional Expressions

The structure and data of the CUST_TRANS table are shown below:

Exhibit:

Question Image

Dates in the CUST_TRANS table are stored using the default dd-mm-rr date format.

Which three SQL statements execute successfully?

Choose three
Explanation

Oracle automatically converts character values in the default date format when they are used in date expressions, so '01-01-07' is valid for a DATE comparison. A character value that is numeric, such as '10', can be implicitly converted to a number; adding that number to a DATE adds days. Comparing the CHAR(2) column CUSTNO with the character literal '11' is also valid. The full month-name value does not match DD-MM-RR, and 'A' cannot be converted to a number for arithmetic. Oracle Database SQL Language Reference: Literals Oracle Database documentation: Data Types, Operators, and Expressions

Learn more

Community Discussion

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