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:
00397737
Views:
14
There is a constraint in SS, but it doesn't work the same way as it does in Oracle - i.e., you can't specify it to CASCADE.
In SS, the table being deleted from is aliased as "deleted" - likewise, for an insert or update the table is aliased "inserted" - so the code would look like this.
CREATE TRIGGER mydelete_trigger 
  ON parent_table
 FOR DELETE 
 AS 
  DELETE FROM child_table WHERE iparentid = deleted.iid
Insanity: Doing the same thing over and over and expecting different results.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform