1Z0-071 · Question #213
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…
The correct answer is C. Only the first query gives the correct result. See the full explanation below for the reasoning.
Question
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?
Exhibit
Options
- AOnly the second query gives the correct result
- BBoth execute successfully but do not give the required result
- COnly the first query gives the correct result
- DBoth execute successfully and give the same result
How the community answered
(57 responses)- A14% (8)
- B5% (3)
- C77% (44)
- D4% (2)
Community Discussion
No community discussion yet for this question.
