gpt4 book ai didi

mysql - desc 附近的 SQL 语法错误

转载 作者:行者123 更新时间:2023-11-29 05:58:36 25 4
gpt4 key购买 nike

<分区>

我得到的错误是:

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Desc) values(1,'Sem 2','1',1,'1234','2017-11-03','2',3,'vnfhmj.k;/kkc')' at line 1

如果我删除 desc... 错误就消失了。可以输入的项目数量有限制吗?

代码:

String query="insert into exam(sub_id,exam_sem,co,tch_id,ex_pwd,ex_date,ex_duration,noofq,Desc) values(?,?,?,?,?,?,?,?,?)";
PreparedStatement pstmt=DatabaseConnector.getPreparedStatement(query);
//pstmt.setInt(1,ed.getEx_id());
pstmt.setInt(1,ed.getSub_id());
pstmt.setString(2,ed.getEx_sem());
pstmt.setString(3,ed.getEx_co());
pstmt.setInt(4,ed.getT_id());
pstmt.setString(5,ed.getEx_pwd());
pstmt.setString(6,ed.getEx_date());
pstmt.setString(7,ed.getEx_duration());
pstmt.setInt(8,ed.getNoofq());
pstmt.setString(9,ed.getDesc());

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com