已有数据的表添加自增主键

alter table `base_dictmark` add dict_id int not null primary key Auto_increment  first;

原文地址:https://www.cnblogs.com/go4mi/p/10369060.html