MYSQL 去除重复 记录

删除旧
delete from a  using mix_crm_contact   as a,mix_crm_contact  as b where a.id<b.id and a.`telphone_num` = b.`telphone_num`
删除新
delete from a  using mix_crm_contact   as a,mix_crm_contact  as b where a.id>b.id and a.`telphone_num` = b.`telphone_num`

猜你喜欢

转载自feitu-jeff.iteye.com/blog/1497144