Query 1:
SELECT cust_last_name, cust_credit_limit
FROM customers
WHERE (UPPER(cust_last_name) LIKE 'A%' OR
UPPER(cust_last_name) LIKE 'B%' OR
UPPER(cust_last_name) LIKE 'C%' AND cust_credit_limit < 10000;
Query 2:
SELECT cust_last_name,cust_credit_limit
FROM customers
WHERE UPPER(cust_last_name) BETWEEN 'A' AND 'C' AND
cust_credit_limit < 10000;
I am trying to generate a report of last names and credit limits of all the customers whose last names start with A, B or C and credit limit is below 10000. Which is the correct way?