1. Why doesn't the following trigger work? Note that STUDENTS is the
master table and STUDCOUNSELORS and TESTS are detail tables. All three
tables have a field called FSID. In this case, there are NOT foreign keys
in the detail tables. When the STUDENT record is deleted, the detail
records from the detail tables are NOT deleted.
CREATE TRIGGER CASCADE_DELETES ON dbo.STUDENTS
from deleted d
delete from STUDCOUNSELORS
delete from TESTS
2. What is the best way to implement a cascading delete in a Master-Detail
relationship when a foreign key DOES exist in the detail tables? Trigger
or Stored Proc?
Texas A&M University