Which two DELETE statements are valid (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 (SELECT * FROM order_items I,orders o
WHERE i.order_id = o.order_id AND order_status IN (0,1));
C. 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));
D. DELETE
FROM order_items
WHERE order_id IN (SELECT order_id
FROM orders
WHERE orders_status in (0,1));

Download Printable PDF. VALID exam to help you PASS.

3 thoughts on “Which two DELETE statements are valid (Choose two.)

  1. A – false, wrong syntax

    B – false, it raises ORA-01752: cannot delete from view without exactly one key-preserved table

    C – true, with correlated subquery

    D – true, with non-correlated subquery and using IN

Leave a Reply

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


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