1、将该自增主键设置为null insert into user values(null,'root','123'); 2、将该自增主键设置为0 insert into user values(0,'root','123'); 3、插入时提前声明属性列 insert into user(username,password) values('root','123');