🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Keys and Constraints: all 10 questions

Quiz: Keys and Constraints · Question 7 of 10

Deleting an order must automatically delete its order items. Which foreign key option does this?

Deleting an order must automatically delete its order items. Which foreign key option does this?

  1. A.ON DELETE RESTRICT
  2. B.ON DELETE SET NULL
  3. C.ON DELETE CASCADE
  4. D.DEFAULT
Answer & explanation

Correct answer: ON DELETE CASCADE

CASCADE deletes the child rows along with the parent.

Can you get the rest right without peeking?

Take the timed Quiz: Keys and Constraints quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →