Sql server - recursive delete

后端 未结 5 2074
别跟我提以往
别跟我提以往 2020-12-28 19:59

I\'m trying to delete user\'s data and all it\'s related data that is located in different tables. All the tables have Foreign Keys but without cascade delete.

I in

5条回答
  •  無奈伤痛
    2020-12-28 20:35

    Oracle solution:

    How to generate DELETE statements in PL/SQL, based on the tables FK relations?

    SQL Server solution:

    Generate Delete Statement From Foreign Key Relationships in SQL 2008?

    Hope it helps

提交回复
热议问题