您的位置:首页 > 其它

165.View the Exhibit and examine the description for the CUSTOMERS table.

2016-03-16 15:47 393 查看
165.View the Exhibit and examine the description for the CUSTOMERS table.

You want to update the CUST_INCOME_LEVEL and CUST_CREDIT_LIMIT columns for the customer with the CUST_ID 2360.

You want the value for the CUST_INCOME_LEVEL to have the same value as

that of the customer with the CUST_ID 2560 and the CUST_CREDIT_LIMIT to have the same value as

that of the customer with CUST_ID 2566.



Which UPDATE statement will accomplish the task?

A.UPDATE customers

SET cust_income_level = (SELECT cust_income_level FROM customers WHERE cust_id = 2560),

cust_credit_limit = (SELECT cust_credit_limit FROM customers WHERE cust_id = 2566)

WHERE cust_id=2360;

B.UPDATE customers SET (cust_income_level,cust_credit_limit) = (SELECT cust_income_level, cust_credit_limit FROM customers

WHERE cust_id=2560 OR cust_id=2566)

WHERE cust_id=2360;

C.UPDATE customers

SET (cust_income_level,cust_credit_limit) = (SELECT

cust_income_level, cust_credit_limit

FROM customers

WHERE cust_id IN(2560, 2566)

WHERE cust_id=2360;

D.UPDATE customers

SET (cust_income_level,cust_credit_limit) = (SELECT

cust_income_level, cust_credit_limit

FROM customers

WHERE cust_id=2560 AND cust_id=2566)

WHERE cust_id=2360;

答案:A

解析:首先排除D,cust_id=2560 AND cust_id=2566这个条件肯定不对,

然后排除C,因为(SELECT cust_income_level, cust_credit_limit FROM customers WHERE cust_id IN(2560, 2566)这里会返回多个值

B和C是一样的,也排除
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: