QuestionQ24

VerifiedRestricting and Sorting Data

The CUSTOMERS table contains a CUST_CREDIT_LIMIT column with the NUMBER data type.

Which two queries execute successfully?

Choose two
Explanation

NVL with a numeric first expression requires its replacement expression to be compatible with a numeric return type; the nonnumeric literal 'Not Available' cannot be converted to NUMBER. Converting the numeric value with TO_CHAR before calling NVL makes both return alternatives character values. NVL2 requires three arguments and returns either its second or third expression; when both are character expressions, it executes successfully.

Learn more

Community Discussion

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