62.View the E xhibit and examine the structure of the CUSTOMERS table.

来源:互联网 发布:我的世界pe村民交易js 编辑:程序博客网 时间:2024/06/05 10:49
62.View the E xhibit 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 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
解析:参考60

0 0
原创粉丝点击