QuestionQ85

VerifiedUsing Conversion Functions and Conditional Expressions

Examine the structure and data in the CUSTJTRANS table:

CUSTJRANS -

| Name | Null? | Type |

|---|---|---|

| CUSTNO | NOT NULL | CHAR(2) |

| TRANSDATE | | DATE |

| TRANSAMT | | NUMBER(6,2) |

| CUSTNO | TRANSDATE | TRANSAMT |

|---|---|---|

| 11 | 01-JAN-07 | 1000 |

| 22 | 01-FEB-07 | 2000 |

| 33 | 01-MAR-07 | 3000 |

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

Choose three
Explanation

Oracle implicitly converts character values to the required noncharacter type when used in a compatible expression. A character numeric literal can be converted to NUMBER for DATE arithmetic, a character column can be compared with another character literal, and a character date value can be converted for comparison with a DATE. Subtracting the nonnumeric character literal 'A' requires an invalid conversion to NUMBER, and the statement ending with a colon is syntactically invalid as written.

Learn more

Community Discussion

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