mysql已有表中修改id为自增

alter table 表名 change id id int AUTO_INCREMENT

注:id必须为主键时才可以这样使用

原文地址:https://www.cnblogs.com/java-ty/p/13371692.html