【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 的表全部行都會被更新到,可是不知足條件的是不會具體賦值,至少有更新的動做。

關聯子查詢:

一、 先執行主查詢,對於主查詢返回的每一行數據,都會形成子查詢執行一次

二、 而後子查詢返回的結果又傳給主查詢

三、 主查詢根據返回的記錄作出判斷

)

相關文章
相關標籤/搜索