QuestionQ205

VerifiedRestricting and sorting data

Review the description of the CUSTOMERS table:

Question Image

You must display the last names and credit limits for every customer whose last name begins with A or B, in either lowercase or uppercase, and whose credit limit is less than 1000.

Review this partial query:

SELECT cust_last_name, cust_credit_limit FROM customers  

Which two WHERE conditions produce the required result?

Explanation

INITCAP(cust_last_name) LIKE 'A%' OR INITCAP(cust_last_name) LIKE 'B%' matches last names beginning with either letter regardless of the original letter case, and cust_credit_limit < 1000 preserves the required decimal-value comparison. ROUND(cust_credit_limit) < 1000 is not equivalent because Oracle rounds an omitted precision to zero decimal places; a credit limit such as 999.50 would become 1000. Oracle INITCAP documentation Oracle ROUND (number) documentation

Learn more

Community Discussion

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