QuestionQ150

VerifiedUsing Conversion Functions and Conditional Expressions

The CUSTOMERS table contains a CUST_CREDIT_LIMIT column whose data type is NUMBER.

Which two queries run successfully?

Choose two
Explanation

NVL2 requires three arguments; when its second and third expressions are both character values, it can return either value without an incompatible conversion. NVL uses the first expression’s type to determine conversion behavior: a numeric first expression with 'Not Available' requires an invalid character-to-number conversion, whereas TO_CHAR(cust_credit_limit * .15) makes both NVL return expressions character values. A misspelled column identifier is invalid.

Learn more

Community Discussion

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