Which DELETE statement would execute successfully?

View the Exhibit and examine the structure of ORDERS and ORDER_ITEMS tables.
ORDER_ID is the primary key in the ORDERS table. It is also the foreign key in the ORDER_ITEMS table wherein
it is created with the ON DELETE CASCADE option.
Which DELETE statement would execute successfully?

View the Exhibit and examine the structure of ORDERS and ORDER_ITEMS tables.
ORDER_ID is the primary key in the ORDERS table. It is also the foreign key in the ORDER_ITEMS table wherein
it is created with the ON DELETE CASCADE option.
Which DELETE statement would execute successfully?

A.
DELETE orders o, order_items I
WHERE o.order_id = i.order_id;

B.
DELETE
FROM orders
WHERE (SELECT order_id
FROM order_items);

C.
DELETE orders
WHERE order_total < 1000;

D.
DELETE order_id
FROM orders
WHERE order_total < 1000;



Leave a Reply 5

Your email address will not be published. Required fields are marked *


evilsoldier

evilsoldier

The correct answer should be C

Andrzej

Andrzej

The correct answer should be B and C.

Marcin

Marcin

Andrzej,

show me condition in B