Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
sqlhunter123
Starting Member
2 Posts |
Posted - 2008-01-14 : 08:44:44
|
Hi All,I have two tables A and B. These are related using a foreign Key. The 'Delete cascade' option is not set in this relation. IS there any way to force delete cascade in delete query using sql? |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-01-14 : 10:25:03
|
One method is to write a DELETE trigger which will delete the matching records from child tables. |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-01-16 : 03:32:23
|
orALTER TABLE master_table NOCHECK CONSTRAINT ALLdelete from master_table where.....delete from child_table where.....ALTER TABLE master_table CHECK CONSTRAINT ALLMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|