首页 > 数据库 > Oracle > OCP 1Z0-051-62
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:
|
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; 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 first query gives the correct result.
B. Only the second query gives the correct result.
C. Both execute successfully and give the same result.
D. Both execute successfully but do not give the required result.
答案:(A)
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/17013648/viewspace-1161534/ ,如需转载,请注明出处,否则将追究法律责任。