Chinaunix首页 | 论坛 | 博客
  • 博客访问: 596755
  • 博文数量: 487
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 4916
  • 用 户 组: 普通用户
  • 注册时间: 2018-07-05 13:59
个人简介

ocp考试资料群:569933648 验证码:ocp OCP 12c 19c考试题库解析与资料群:钉钉群号:35277291

文章分类

全部博文(487)

文章存档

2023年(37)

2021年(151)

2020年(37)

2019年(222)

2018年(38)

我的朋友

分类: Oracle

2019-10-23 15:34:54

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、 主查询根据返回的记录做出判断

)

阅读(709) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~