Which DELETE statement would execute successfully?

Prev Question
Next Question

View the Exhibit and examine the structure of ORDERS and ORDER_ITEMS tables.

Exam 1Z0-047 - Which DELETE statement would execute successfully?

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 order_id
FROM orders
WHERE order_total < 1000;

B.
DELETE orders
WHERE order_total < 1000;

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

D.
DELETE orders o, order_items i
WHERE o.order_id = i.order_id;

Prev Question
Next Question

Leave a Reply

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