mybatis的报错____3Error updating database. Cause: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right

仔细查看报错日志中的sql语句:

### SQL: update smbms_bill          set billCode=?,             productName=?,             productDesc=?, where id=?

没错,在where id = ?之前多了一个 逗号,正确姿势,去删掉接口配置文件中 最后一个if标签的逗号。

(不得不说 log4j日志打印信息真是好用!)

原文地址:https://www.cnblogs.com/xbfchder/p/11247727.html

时间: 2024-11-08 21:39:49

mybatis的报错____3Error updating database. Cause: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right的相关文章

mybatis的报错总结_____2Error updating database. Cause: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the ri

在编写动态sql时 trim的属性写错了,如下图: 错误示范: (接口的xml配置文件中:) 1 <update id="modifyBill" parameterType="Bill"> 2 update smbms_bill 3 <trim suffix="set" prefixOverrides="," prefix="where id=#{id}"> 4 <if tes

插入mysql语句报错:1064 - 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

插入一个很简单的sql语句时候,mysql一直报错: [SQL] INSERT INTO ORDER ( id, activity_id, order_type, phone, order_amount, order_state, pay_type)VALUES ( '4', '2121313', '1', '13552444989', '1', '1', '1' ) [Err] 1064 - You have an error in your SQL syntax; check the man

mysq添加外键报错:check the manual that corresponds to your MySQL server version for the right syntax to use near &#39;TYPE=InnoDB&#39; at line 1

今天用navcat往一个表添加外键的时候报错: 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 'TYPE=InnoDB' at line 1 排查之后发现是因为两个表的类型不一样所致: SQL:SHOW TABLE STATUS 查询出数据表的状态,Engine那一列就是 使用

SQL语句报错:You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near

报错如图: 最开始其实我的列名tname和tsubject分别叫name和subject,后来看到网上有说这个报错可能是数据库建表的时候使用了mysql的关键词,我就只把name改了.后来还是这个问题,百思不得其解. 后来同学告诉我说老师帮她检查SQL语句的问题时都是把php程序里的SQL语句先复制到mysql里面去执行看是不是数据库的问题的. 太tm机智了,我怎么没想到呢,姜还是老的辣.复制过去一看,怎么subject也是关键词啊! 很有信心的改掉以后等待正确结果,但是竟然还是这个错... 没

报错:MySQL check the manual that corresponds to your MySQL server version for the right syntax

今天在向MySQL中插入数据时,报了标题的错误,因为我用的是session.save(object)方法,后台打印出的object和sql语句都没有问题,后来在网上查询,发现http://blog.csdn.net/vanezuo/article/details/6686089中有讲到这个问题,而我的表的字段中有inout,state,lost,然后我就改了字段名,果然可以了,但我现在还是不知道具体哪一个字段冲突了

java插入数据至mysql数据库报错:check the manual that coresponds to your mysql server version for the right syntax to use near &#39;condition)values...解决方案

MySQL5.X(本地数据库) 使用java向表中插入数据时,每次数据库更新,pstm.executeUpdate();就会跳到IO报错,提示原因是sql语法有问题,如题可见 当测试插入数据不含condition字段时,插入成功,尝试更名为conDition时,仍报错 解决方案: 更改condition为conDi,原因可能时因为condition为数据库或java关键字不能使用,更名后不再受影响,插入成功. java插入数据至mysql数据库报错:check the manual that c

mysql报错:MySQL server version for the right syntax to use near &#39;type=InnoDB&#39;

工作中使用sql语句建表时,mysql报了如下错误: 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 'type=InnoDB' at line 1 解决方案: 这个报错是由于某些版本的mysql不支持type写法,将type关键词改成ENGINE 即可. 版权声明:本文为博主原

Mybatis缓存报错org.apache.ibatis.exceptions.PersistenceException

错误信息如下: org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: org.apache.ibatis.cache.CacheException: Error deserializing object. Cause: java.lang.ClassNotFoundException: com.kytsoft.model.Adminlink ### Cause: org.apa

MyBatis批量操作报错:Parameter &#39;xxxList&#39; not found. Available parameters are [list]

需求: 根据传入的参数批量 删除数据: DAO: List ll = new ArrayList<Integer>(); for(int i=10;i<25;i++){ ll.add(i); } int res = userMapper.delUser(li); System.out.println(res); xml: <delete id="delUser" parameterType="list" > delete from us