数据库多表级联删除
2018-11-26 本文已影响0人
倦鸟余花lee
DELETE a, b, c, d
FROM t_object_db a, t_object_db b, t_sync_object_mapping c, t_sync_object d
WHERE a.id=c.src_id
AND b.id=c.dst_id
AND c.sync_object_id = d.id
AND d.id=#{id}
DELETE a, b, c, d
FROM t_object_db a, t_object_db b, t_sync_object_mapping c, t_sync_object d
WHERE a.id=c.src_id
AND b.id=c.dst_id
AND c.sync_object_id = d.id
AND d.id=#{id}