前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
社区首页 >专栏 >【2019年8月】OCP 071认证考试最新版本的考试原题-第14题

【2019年8月】OCP 071认证考试最新版本的考试原题-第14题

原创
作者头像
用户5892232
修改2019-10-23 17:12:17
修改2019-10-23 17:12:17
6850
举报

Choose two.

Examine this SQL statement:

UPDATE orders o

SET customer_name =

(SELECT cust_last_name

FROM customers

WHERE customer_id=o.customer_id);

Which two are true?

A) The subquery is executed before the UPDATE statement is executed.

B) All existing rows in the ORDERS table are updated.

C) The subquery is executed for every updated row in the ORDERS table.

D) The UPDATE statement executes successfully even if the subquery selects multiple rows.

E) The subquery is not a correlated subquery.

Answer:BD

(解析:这道题考的就是关联子查询,类似题目以前有考过。实验证明 orders 的表所有行都会被更新到,但是不满足条件的是不会具体赋值,至少有更新的动作。

关联子查询:

1、 先执行主查询,对于主查询返回的每一行数据,都会造成子查询执行一次

2、 然后子查询返回的结果又传给主查询

3、 主查询根据返回的记录做出判断

)

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档