cascading deletes : LUSENET : SQL Server Database Administration : One Thread

Hi Eric,

Is there an option within sql server 7 that allows one to set deletes to be cascading to all dependent tables from your parent table? at this point i can only think of creating triggers for all tables with relationships,

thanks in advance.

-- Anonymous, April 11, 2000



Neil Pike, MVP/MCSE of Protech Computing Ltd. provides this answer:

There aren't any [cascading deletes] I'm afraid. These were initially thought to be going into SQL 7.0 but will now only be in SQL 2000 - due by the end of 1st half 2000. For now, you need to implement your own cascade functionality with triggers. See Q142480 in the Microsoft Kb for more information on this and the ways to work with foreign keys which cause problems due to the way that triggers work/fire. You can get some code samples for various sorts of triggers that implement this functionality from 20Integrity.ppt

[Be sure to type the URLs all on one line without spaces.] Good Luck,


-- Anonymous, April 11, 2000

Moderation questions? read the FAQ