I am using SQL Server 2008 Express R2 and I have a table that is self referencing, because I have a hierarchy struct.
I need to delete a root node, but I get an error because of foreign key. I have read that I can use two option, use a recursive CTE o use a instead of delete trigger.
Which is the difference brtween both of them? which is more efficient?
Thanks.