Multiple choice technology databases

Target table T1 is getting deleted. Table T2 has the foreign key. We require that whenever a row from T1 is deleted, the corresponding row from T2 also be deleted. Which option can be used?

  1. ON DELETE RESTRICT

  2. ON DELETE CASCADE

  3. ON DELETE SET NULL

  4. ON DELETE CHILD

  5. ON DELETE MATCH

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

ON DELETE CASCADE automatically deletes all matching rows in the child table (T2) when the referenced row in the parent table (T1) is deleted. RESTRICT prevents deletion if child rows exist, SET NULL sets the foreign key to NULL, and CHILD and MATCH are not standard ON DELETE options.