Which statement is true regarding the execution of the above queries?

View the Exhibit and examine the structure of the CUSTOMERS table.

You want to generate a report showing the last names and credit limits of all customers whose last names start with A, B, or C, and credit limit is below 10,000. Evaluate the following two queries:
SQL> 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;
SQL>SELECT cust_last_name, cust_credit_limit FROM customers
WHERE UPPER (cust_last_name) BETWEEN ‘A’ AND ‘C’ AND cust_credit_limit < 10000;
Which statement is true regarding the execution of the above queries?
A. Only the second query gives the correct result
B. Both execute successfully but do not give the required result
C. Only the first query gives the correct result
D. Both execute successfully and give the same result

Download Printable PDF. VALID exam to help you PASS.

One thought on “Which statement is true regarding the execution of the above queries?

  1. C
    First query returns the correct result. Second query returns wrong result because last names which start with ‘C’ is greater than character ‘C’

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.