摘要:
Mysql 删除表重复记录,当有多条重复记录时,保存最新记录。 方法一、 delete from IP where ip_id in (select * from (select max(ip_id) as ip_id from IP group by ip_name having count(ip_id)>1) as a) 方法二、 delete IP as a from I... 阅读全文
摘要:
SELECT ip_name,count(ip_name) as ipcount from IP GROUP BY ip_name where ipcount >1;本以为可以像在MSsql一样现在,发现不行,下面是在Mysql方法SELECT ip_name,count(ip_name) as ipcount from IP GROUP BY ip_name having count(ip_... 阅读全文