Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SP for Cascade Deletes
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Divers
Thread ID:
00397669
Message ID:
00399936
Vues:
14
' CREATE TRIGGER trigger_name FOR DELETE on parent_table
AS
DELETE FROM child_table
WHERE fkid IN (SELECT PK FROM deleted)
GO '

Mike,

Thanks for for the input. I used somebody's else syntax that went like:
****
CREATE TRIGGER trigger_name FOR DELETE on parent_table
as
delete child_table
from child_table, Deleted
where child_table.fkid = deleted.pk
****

Seems to do the job -- anything wrong with this second approach?

Thanks,

Kevin
Kevin Emmrich
www.jkt9000.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform