>>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).
If it's not broken, fix it until it is.
My Blog