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;

Download Printable PDF. VALID exam to help you PASS.

8 thoughts on “Which DELETE statement would execute successfully?

  1. ans c is right answer because when on delete cascade specified in order items table(which is child table
    we remove from order table.(master table)
    (the specified condition with delete matching rows are removed from
    both tables order,order items.

          1. C would execute successfully, so, is the correct answer.

            It cannot be B, because any condition in the WHERE clause must evaluate to TRUE/FALSE. A select does not evaluate to TRUE/FALSE.

            This would also execute successfully :
            DELETE
            FROM orders
            WHERE order_id in (SELECT order_id
            FROM order_items);

Leave a Reply

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


The reCAPTCHA verification period has expired. Please reload the page.