发布时间:2017-03-22 11:05:35
1.查找表中多余的重复记录,重复记录是根据单个字段(ipaddr_to_long)来判断 SELECT * FROM ips WHERE ipaddr_to_long IN (SELECT ipaddr_to_long FROM ips GROUP BY ipaddr_to_long HAVING COUNT(ipaddr_to_long) > 1) 2.去重 留ID最小的数据DELETE FROM ips a WHERE (a.ipaddr_to_long) IN.........【阅读全文】