Emp.dept_id is a foreign key referencing Dept(id), declared with no ON DELETE action. What happens if you try to delete a Dept row that some Emp rows still reference?
Correct answer D. The delete is rejected with a foreign key violation
Explanation
When no ON DELETE clause is given, the default action is NO ACTION, which behaves like RESTRICT for a simple delete: the DBMS refuses the delete because it would leave dangling references. Deleting the child rows happens only with ON DELETE CASCADE, and setting them to NULL needs ON DELETE SET NULL. Leaving orphans pointing to a missing row is exactly what referential integrity forbids.
Answer checked How we write and check questions
Discussion