时间:2021-07-01 10:21:17 帮助过:2人阅读
delete table from table a, ( select b.val1 ,b.val2 ,COUNT(1) as cnt from table b group by b.val1 ,b.val2 haval1g COUNT(1) > 1 )b where a.val1 = b.val1 and a.val2 = b.val2 and a.id not in ( select MAX(id) as id from table a group by val1 ,val2 haval1g COUNT(1) > 1 )
【数据库】 关联多表删除重复数据
标签: