Referential Integrity and Triggers help

Referential Integrity and Triggers help

Post by Stephen Johnsto » Sat, 16 Jan 1999 04:00:00



Hello All-

    Currently I have a trigger which ensures that when a record is deleted
from one table it's detail table's records are also deleted. Is there a way
to do this through declarative referential integrity, instead of through the
trigger. In the long run I want change as many of my triggers as possible
over to DRI, I am just using this one as a test case (it is the simplest,
and least important table).

Thanks for the help-
Stephen Johnston

 
 
 

Referential Integrity and Triggers help

Post by BPMargoli » Sun, 17 Jan 1999 04:00:00


What you are describing is a CASCADE DELETE.

Although the ANSI-92 standard supports it, SQL Server (both 6.x and 7.0) do
not yet implement it.