重复记录的处理

问题:写个删除一个字段的重复记录的sql语句

delete from tab1 where id not in 
(SELECT max(id) FROM tab1 GROUP BY phone)


select * from test a where a.id !=( select max(id) from test b where b.ph=a.ph ) 

原文地址:https://www.cnblogs.com/xiaoluozi513/p/1357564.html