Prev Question
Next Question

Examine the command:
SQL> ALTER TABLE books_transactions
ADD CONSTRAINT fk_book_id FOREIGN KEY (book_id)
REFERENCES books (book_id) ON DELETE CASCADE;
What does ON DELETE CASCADE imply?

A.
When the BOOKS table is dropped, the BOOK_TRANSACTIONS table is dropped.

B.
When the BOOKS table is dropped, all the rows in the BOOK_TRANSACTIONS table are deleted but the table
structure is retained.

C.
When a row in the BOOKS table is deleted, the rows in the BOOK_TRANSACTIONS table whose BOOK_ID
matches that of the deleted row in the BOOKS table are also deleted.

D.
When a value in the BOOKS.BOOK_ID column is deleted, the corresponding value is updated in the
BOOKS_TRANSACTIONS.BOOK_ID column.

Prev Question
Next Question

Leave a Reply

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