Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cascade Deletes in SQL*Server
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00397728
Message ID:
00397748
Views:
12
>...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
Previous
Reply
Map
View

Click here to load this message in the networking platform