mysql 给已存在的主键字段设置自增


第一步:给 id 增加auto_increment 属性

alter table tablename modify id int(11) auto_increment;

第二步:给自增值设置初始值

alter table tablename auto_increment=10000;

posted @ 2019-02-26 14:46  蔚之蓝  阅读(16055)  评论(0编辑  收藏  举报