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 FROM orders WHERE (SELECT order_id FROM order_items);

B.
DELETE orders WHERE order_total < 1000;

C.
DELETE order_id FROM orders WHERE order_total < 1000;

D.
DELETE orders o, order_items i WHERE o.order id = i.order id;



Leave a Reply 1

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


ming

ming

Oh, I didn’t know that FROM can be omitted in the DELETE clause.