Assume Table A has two children tables, B and C with cascade delete between A-B, and cascade delete between A-C.
When a row is 开发者_如何转开发deleted in A, the matching rows from B and C are deleted.
How does SQL Server determine the order of the Cascades to fire? What I need is to fire the A-C cascade delete before the A-B cascade delete fires.
I know I can do this with triggers, but I don't want to, unless I absolutely have to.
If the order is that important, this is a database design smell and it also points to the fact that you probably should not be using cascading deletes for this data integrity operation.
精彩评论