tsql - Sql server - recursive delete -
i'm trying delete user's data , it's related data located in different tables. tables have foreign keys without cascade delete.
i investigated options:
- enable cascade delete on fk, delete , remove cascade delete.
- delete bottom up, loop leaves delete , repeat operation till root.
are there more smart option or other techniques?
i'm using microsoft sql server 2012 (sp1)
oracle solution:
how generate delete statements in pl/sql, based on tables fk relations?
sql server solution:
generate delete statement foreign key relationships in sql 2008?
hope helps
Comments
Post a Comment