Database Management
Accenture PrimermediumDatabase ManagementFunction - Scalar & Aggregate

To generate a report that shows an increase in the credit limit by 15% for all customers. Customers whose credit limit has not been entered should have the message "Not Available" displayed. Which SQL statement would produce the required result?

Answer options

A
SELECT NVL(TO_CHAR(cust_credit_limit*.15), 'Not Available') "NEW CREDIT" FROM customers;
B
SELECT IFNULL(cust_credit_limit * 0.15, 'Not Available') "NEW CREDIT" FROM customers;
C
SELECT NULLIF(cust_credit_limit*.15, 'Not Available') "NEW CREDIT" FROM customers;
D
SELECT cust_credit_limit * 0.15 "NEW CREDIT" FROM customers;

Correct answer: SELECT NVL(TO_CHAR(cust_credit_limit*.15), 'Not Available') "NEW CREDIT" FROM customers;

Explanation

NVL(TO_CHAR(expr), 'Not Available') handles NULL: converts the number to string first so both arguments are the same type.

Related Accenture Database Management questions

Practice more Accenture Database Management questions

PrimerDumps has 1400+ primer questions, 2026 mocks and coding hands-on — all free.