QuestionQ84

VerifiedUsing Conversion Functions and Conditional Expressions

Refer to the Exhibit and examine the structure of the PROMOTIONS table. Which SQL statements are valid?

Question Image

Choose two
Explanation

DECODE compares an expression with equality search values and returns the associated result or default. Statements A and B use valid numeric expressions and compatible return values. In statement C, the first result is numeric, so Oracle establishes a numeric return type and attempts to convert the default character value 'N/A' to a number when that default is returned. Statement D is invalid because >10000 and <10000 are relational conditions, not valid DECODE search expressions.

Learn more

Community Discussion

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