在做一个tomcat的java网页项目,用的是mysql5.6和myeclipse10现在利用sql向record表里增加记录,其中recordid是主键且设置成自增,现在的代码是
insert into record values(?,?,?,?,?)
表的结构为
create table record (
recordid           integer                         not null,
studentid          integer,
bookid             integer,
btime              date,
bookname              varchar2(20),
recordtimeofreborrow integer,
consttraint PK_RECORD primary key (recordid)
);
错误是java.sql.SQLException: Column count doesn't match value count at row 1
怎样把第一项进行忽略啊,要如何写sql语句
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
insert into record(
studentid ,
bookid ,
btime ,
bookname ,
recordtimeofreborrow ) values (?,?,?,?,?)