Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cascade Deletes in SQL*Server
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00397728
Message ID:
00397748
Vues:
13
>...You could put a trigger on the table to delete child records...
>
>I hate show my ignorance (and I did look thru some of the documentation), but what does the syntax for a casecade delete trigger look like?
>
>Kevin

create trigger ParentDeleteTrig
on Parent
for delete as
begin
/* RI to keep tables in sync */
delete Children
from Children C, deleted D
where D.ID = C.PARENTID

delete ...
end


where Parent is parent table name, children is children name, id fields are foreign keys.

Hope this helps

Mace
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform