Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Self Join Referential Integrity
Message
 
 
To
15/09/2011 13:27:22
General information
Forum:
Microsoft SQL Server
Category:
Database design
Environment versions
SQL Server:
SQL Server 2008
Miscellaneous
Thread ID:
01523616
Message ID:
01523649
Views:
25
>>>>It does, but have you tested it?
>>>>
>>>
>>>I am working on some data at the end of a huge import so don't want test it and find out it deletes all employees or something like that :)
>>>
>>>Now that you think it looks OK, I'll back up the database and do some tests.
>>>
>>>Thanks
>>
>>It seems to look OK, but I'm not 100% sure it's going to work as you may get into the same problem of nesting level exceeded.
>>
>>I suggest to create a test table (separate from your real life with the deep chain of parent/child and then try deleting a parent with many children, grand children, etc. and see, if it will work or not).
>
>There's only one level deep, and my tests have worked so far.
>
>Thanks

With one level deep your trigger is OK. But if we want to solve a generic problem with any number of levels deep, then look into my latest reply to Boris.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform