September 20, 2002 at 5:18 pm
So, there is no cascading deletes in mssql7. I've been to told use triggers. Is there any other way. Could someone demonstrate the trigger syntax or any other ways to accomplish a cascading delete. Thank you
September 20, 2002 at 9:05 pm
In SQL 2000, you can delete in cascade. A trigger could be
Create Trigger T_Name
On Table_Name
For Delete
As
Delete OtherTableName
Where WhatEver= Whatever
You can change it. You will need to create more indexes, one for every table. Or if after deleting a record from a table, you need to delete other tables, create a trigger fopr that table and include the delete for all the others tables.
September 23, 2002 at 5:09 am
Cascade delete is a dangerous one,Before delete you should be careful, because there may be references.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply