Generate Delete Statement From Foreign Key Relationships in SQL 2008?

前端 未结 5 1322
既然无缘
既然无缘 2020-11-27 15:00

Is it possible via script/tool to generate a delete statement based on the tables fk relations.

i.e. I have the table: DelMe(ID) and there are 30 tables with fk refe

5条回答
  •  星月不相逢
    2020-11-27 15:22

    Another technique is to use a code generator to create the Sql. I'm pretty sure the MyGeneration (no connection) has existing templates to do this. Using that tool and the right template you can create a sql script that deletes the relevant stuff with no pain.

提交回复
热议问题