[August 2019 edition] OCP 071 certification test original topic - 41 questions

choose three

The ORDERS table has a primary key constraint on the ORDER_ID column.

The ORDER_ITEMS table has a foreign key constraint on the ORDER_ID column,referencing the primary key of the ORDERS table.

The constraint is defined with on DELETE CASCADE.

There are rows in the ORDERS table with an ORDER_TOTAL less than 1000.

Which three DELETE statements execute successfully?

A) DELETE FROM orders WHERE order_total<1000;

B) DELETE * FROM orders WHERE order_total<1000;

C) DELETE orders WHERE order_total<1000;

D) DELETE FROM orders;

E) DELETE order_id FROM orders WHERE order_total<1000;

Answer:ACD

(Analysis: This is a test of grammar questions, a low-IQ topic, because the definition of the foreign key when using the DELETE CASCADE option, so the row in the parent table is deleted.)

Guess you like

Origin blog.51cto.com/13854012/2459181