本文目录


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

    第一步:给 id 增加auto_increment 属性

    alter table tablename modify id int(11) auto_increment;

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

    alter table tablename auto_increment=10000;

    原文地址:https://www.cnblogs.com/staring0815/p/10437270.html

    文章作者:  BigYoung
    版权声明:  本网站所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 BigYoung !