delete c_userfee as a from c_userfee as a,
(
select *,min(id) from c_userfee group by feetime,account having count(1) > 1
) as b
where a.feetime = b.feetime and a.account=b.account and a.id > b.id;
mysql 删除重复数据
最新推荐文章于 2024-12-16 16:46:56 发布
本文介绍了一种使用SQL语句来删除数据库表中重复记录的方法。通过子查询选择具有相同feetime和account但ID不是最小的记录进行删除,有效清理了重复数据。
281

被折叠的 条评论
为什么被折叠?



