MySQL设置自增长字段 NET菜鸟 2022-12-17 96 阅读1分钟 -- 设置自增长的字段 create table table1(id int auto_increment primary key ) -- 设置每次自增长的值, id =1,2,3,4... set auto_increment_increment=1; show variables like 'auto_increment%'; SELECT*from table1 INSERT into table1 VALUES(NULL)