1. Home
  2. Database Management Systems
  3. Database Management Systems
  4. With a foreign key defined as ON DELETE CASCADE, deleting…

Added 2 Nov 2026

With a foreign key defined as ON DELETE CASCADE, deleting a parent row will:

  1. Fail if any child rows still reference it
  2. Leave the child rows completely unchanged
  3. Set the child foreign keys to NULL values
  4. Automatically delete the matching child rows Correct answer

Correct answer

D. Automatically delete the matching child rows

16 views

MCQSEXAM

Explanation

ON DELETE CASCADE removes dependent rows, for example deleting a customer deletes their orders. RESTRICT blocks the delete, and SET NULL clears the reference.

Reference

Asked in: GATE CS, NTS, PPSC

Preparing for an exam?

Doubts & discussion

Not sure why the answer is D? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Database Management Systems MCQs

Practise all Database Management Systems MCQs

Similar MCQs