且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

级联删除查询

更新时间:2023-02-02 23:19:52

如果您无法添加传播删除操作的约束,则必须自己编写所有必需的删除操作:

If you can't add constraints that propagates the delete, you have to write all the necessary deletes yourself:

delete employee where companyid in (select companyid from company c where productid = xxx);
delete company where productid=xxx;
delete product where productid=xxx;