use sipstats; set autocommit=0; alter table mark drop primary key; alter table mark add column id int unsigned not null auto_increment primary key first; alter table mark add key name_idx (name); commit; set autocommit=1;