mysql 删除重复数据

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;

参考:http://yueliangdao0608.blog.51cto.com/397025/81391

你可能感兴趣的:(C++,c,mysql,Blog,C#)