Delete the original primary key fields (such as id)
alter table table_name drop id;
Add a primary key, increment, in the first place
alter table table_name add id int(11) primary key auto_increment first;
Delete the original primary key fields (such as id)
alter table table_name drop id;
Add a primary key, increment, in the first place
alter table table_name add id int(11) primary key auto_increment first;