eclipse中tomcat console提示如下:
An explicit value for the identity column in table 'users' can only be specified when a column list is used and IDENTITY_INSERT is ON.
users中的字段有:userid,username,passwd,grade
原始:
String sqlUpdate="insert into users values (null,?,?)";
由于users中的userid设置为自动增长,所以不需要在插入时设置该值,修改为:
String sqlUpdate="insert into users values (?,?)";