错误内容

org.springframework.jdbc.BadSqlGrammarException:
### Error 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 syntax to use near '= '553fe0583195819abb6bf1bd2f03d5f32a17f2238f9d23d6c70f67e947e43b33',' at line 2
### The error may involve com.slabs.upload.database.mapper.AgentBillDetailDAO.batchUpdateSealIdByPrimaryKey-Inline
### The error occurred while setting parameters
### SQL: update agent_bill_detail             seal_id = ?,             is_send = ?,             receive_time = ?             where detail_id = ?          ;              update agent_bill_detail             seal_id = ?,             is_send = ?,             receive_time = ?             where detail_id = ?
### 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 syntax to use near '= '553fe0583195819abb6bf1bd2f03d5f32a17f2238f9d23d6c70f67e947e43b33',' at line 2
; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: 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 '= '553fe0583195819abb6bf1bd2f03d5f32a17f2238f9d23d6c70f67e947e43b33',' at line 2

解决方法

本人连接的是mysql数据库,检查sql语法并无错误。而此处为 多条query语句,报错信息指向分号后的第二条语句。
判断可能是连接的datasource默认只允许执行单个query语句。
在连接datasource的url后面增加参数allowMultiQueries=true

url: jdbc:mysql://localhost:3306/node_seal?serverTimezone=UTC&zeroDateTimeBehavior=round&allowMultiQueries=true

[mybatis] sql语句无错误,但是执行多条sql语句时,抛出java.sql.SQLSyntaxErrorException相关推荐

  1. [mybatis] sql语句无错误,但是执行多条sql语句时,抛出java.sql.SQLSyntaxErrorException...

    错误内容 org.springframework.jdbc.BadSqlGrammarException: ### Error updating database. Cause: java.sql.S ...

  2. MySQL实战 | 01 当执行一条 select 语句时,MySQL 到底做了啥?

    原文链接:当执行一条 select 语句时,MySQL 到底做了啥? 也许,你也跟我一样,在遇到数据库问题时,总时茫然失措,想重启解决问题,又怕导致数据丢失,更怕重启失败,影响业务. 就算重启成功了, ...

  3. mysql执行两条update语句

    执行两条update语句,没有join关联时 update dp_auto_group_price dagp ,dp_auto_group dag set dagp.is_pub = 0 ,dag.s ...

  4. java.sql.SQLException: Value ”0000-00-00 00:00:00“ can not be represented as java.sql.Timestamp

    java.sql.SQLException: Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp 分析: ...

  5. 已解决:java.sql.SQLException: Value ‘0000-00-00 00:00:00‘ can not be represented as java.sql.Timestamp

    一.问题 一大早到公司 Mysql 中的一个 datetime 字段时碰到了一个 Cause: java.sql.SQLException: Value '0000-00-00 00:00:00' c ...

  6. Caused by: java.sql.SQLException: Value ‘0000-00-00 00:00:00‘ can not be represented as java.sql.Tim

    一.今天在使用Seatunnel从Mysql往Hive抽数时,报错: Caused by: java.sql.SQLException: Value '0000-00-00 00:00:00' can ...

  7. mysql查表的时候报错:java.sql.SQLException: Value ‘0000-00-00 00:00:00‘ can not be represented as java.sql.T

    mysql查表的时候报错:java.sql.SQLException: Value '0000-00-00 00:00:00' can not be represented as java.sql.T ...

  8. python执行oracle的sql语句_在oracledb中执行SQL脚本一次执行一条语句

    假设我有一个sql脚本,如下所示:--split statement 1 ALTER TABLE abs ADD (make VARCHAR2(2 byte), model varCHAR2(12 B ...

  9. oracle常用插入一条语句,Oracle:用一条 INSERT 语句批量插入多条记录

    用一条 INSERT 语句批量插入多条记录,实例如下: 先建立这样一个表 T: SQL> DESC T Name                       Null?    Type ---- ...

最新文章

  1. PyTorch之前向传播函数自动调用forward
  2. hdu 1520 树形dp
  3. C#编程语言之MD5加密的两种方式
  4. FLP不可能性(FLP impossibility)
  5. Linux网络编程 之 广播(五)
  6. 清明节,如何用代码让网页变灰
  7. 大数据分析如何保证数据质量
  8. openmv探索_5_openmv读取的数据输出到外界
  9. vscode安装 Fira Code 编程字体,编程符号更精致美观
  10. 数字后端概念——Wire Shape
  11. 鸿蒙中文翻译,华为鸿蒙出世,“鸿蒙”应该怎样翻译?这些古语才是中国人的浪漫!...
  12. 如何利用Python实现自动打卡签到
  13. nc65右键生成菜单_NC65管理员层级管控
  14. Android源代码编译的准备工作
  15. 2419. Grass Planting
  16. 玩转微信小程序 之 获取用户信息以及玩转基本列表渲染(2019/04/14)
  17. Vue3商店后台管理系统设计文稿篇(七)
  18. MATLAB递归将数字一个个输出,数米粒个数和每个米粒面积的matlab算法实现(递归)。 | 学步园...
  19. 苹果应用商店审核_苹果应用商店审核流程更新:给开发者申诉的机会
  20. iOS 集成聚宝云支付

热门文章

  1. ccf计算机认证考试题集,【计算机本科补全计划】CCF计算机职业资格认证 2017-03 试题初试...
  2. Centos7登陆颜色修改#PS1
  3. 【Vue系列】Vue3.0知识点汇总整理
  4. w10计算机无法打印,win10提示“无法打印 似乎未安装打印机”怎么办
  5. 常见问题汇总:FLUENT面数据处理
  6. ESP32-BMP180气压、气温传感器
  7. 大天使之剑h5服务器临时维护,《大天使之剑H5》2月28日维护更新公告
  8. 学计算机要买什么笔记本,学计算机的买什么笔记本
  9. 【技术贴】怎么装系统?到店里重装系统,装驱动。价钱多少 ?
  10. 【Pytorch】torch. bmm()