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

Choose two.ide

Examine this SQL statement:this

UPDATE orders oip

SET customer_name =it

(SELECT cust_last_nametable

FROM customersast

WHERE customer_id=o.customer_id);class

Which two are true?date

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

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 的表全部行都会被更新到,可是不知足条件的是不会具体赋值,至少有更新的动做。

关联子查询:

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

二、 而后子查询返回的结果又传给主查询

三、 主查询根据返回的记录作出判断

)

相关文章
相关标签/搜索