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是一样的,也排除
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是一样的,也排除
相关文章推荐
- docker 下 安装rancher 笔记
- Hibernate 操作 oracle数据库,报错总结
- 数据类型转换不当导致数据库不能正确插入数据问题
- InvocationTargetException异常浅谈
- 实验1:用户的登录与退出、IO重定向与简单文件操作
- IC卡复位应答Attr结构
- Bootstrap 进度条 列表组
- Spring事务配置的五种方式
- 使用eclipse导出jar包
- 数据结构(10)线性表之双向链表
- Objective-C内存布局
- Swift - UISearchController初步学习
- 脚本中 Find 按名字寻找物体
- 自定义iOS7导航栏背景,标题和返回按钮文字颜色
- 四则运算生成
- 数据库场景选型
- Android——问题解决之adb not responding;adb不是内部或外部命令;path变量的默认值为多少
- Java反射使用技巧
- tomcat7+jdk的keytool生成证书 配置https
- hdu 5643King's Game(约瑟夫游戏,递归)