1.设置自增长
alter table table_name AUTO_INCREMENT= 1
2.Mysql查询某字段值重复的数据
select user_name,count(*) as count from user group by user_name having count>1;
alter table table_name AUTO_INCREMENT= 1
select user_name,count(*) as count from user group by user_name having count>1;