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`

你可能感兴趣的:(mysql,数据库,职场,休闲,删除重复)