OCP-12cCUUG 071题库考试原题及答案解析(17)

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了OCP-12cCUUG 071题库考试原题及答案解析(17)相关的知识,希望对你有一定的参考价值。

17、(7-11) choose two
View the Exhibit and examine the structure of ORDER_ITEMS and ORDERS tables.
You need to remove from the ORDER_ITEMS table those rows that have an order status of 0 or 1 in
the ORDERS table.
Which two DELETE statements are valid? (Choose two.)

A) DELETE
FROM order_items
WHERE order_id IN (SELECT order_id
FROM orders
WHERE order_status in (0,1));

B) DELETE *
FROM order_items
WHERE order_id IN (SELECT order_id
FROM orders
WHERE order_status IN (0,1));

C) DELETE
FROM (SELECT * FROM order_items i,orders o
WHERE i.order_id = o.order id AND order_status IN (0,1));

D) DELETE FROM order_items i
WHERE order_id = (SELECT order_id FROM orders o
WHERE i.order_id = o.order_id AND order_status IN (0,1));
Answer:AC
(解析:B 和 C 语法不对,可以实验,都会报错)

以上是关于OCP-12cCUUG 071题库考试原题及答案解析(17)的主要内容,如果未能解决你的问题,请参考以下文章

OCP-12cCUUG 071题库考试原题及答案解析(18)

OCP-12cCUUG 071题库考试原题及答案解析(18)

OCP-12cCUUG 071题库考试原题及答案解析(19)

OCP-12cCUUG 071题库考试原题及答案解析(13)

OCP-12cCUUG 071题库考试原题及答案解析(24)

OCP-12cCUUG 071题库考试原题及答案解析(17)