QuestionQ26

VerifiedManipulating Data

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 that references 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?

Choose three
Explanation

Oracle permits DELETE with or without the optional FROM keyword. Deleting either the qualifying parent rows or all parent rows succeeds because ON DELETE CASCADE automatically deletes the related child rows in ORDER_ITEMS.

Community Discussion

No comments yet. Be the first to start the discussion!