当前位置:网站首页>项目中批量update
项目中批量update
2022-07-05 15:26:00 【小蚂蚁hjk】
业务场景是,每条修改的值都不相同
dao

xml:

做到这一步还没有完;此时mysql还不支持批量修改会报错
Cause: 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 'UPDATE weibo_content
SET
EMOTION = 0.0
W' at line 7
; bad SQL grammar []; nested exception is 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 'UPDATE weibo_content
当时一直以为是自己的语法有误其实不是的,这是因为配置数据源的时候缺少配置

&allowMultiQueries=true这条语句允许一次提交多条sql语句。特别是分号;
完美解决,还是百度发现的
边栏推荐
- vlunhub- BoredHackerBlog Social Network
- F. Min cost string problem solving Report
- Severlet learning foundation
- 2.3 learning content
- Reproduce ThinkPHP 2 X Arbitrary Code Execution Vulnerability
- CSRF, XSS science popularization and defense
- Usage and usage instructions of JDBC connection pool
- Replknet: it's not that large convolution is bad, but that convolution is not large enough. 31x31 convolution. Let's have a look at | CVPR 2022
- Vulnhub-Moneybox
- MySQL5.7的JSON基本操作
猜你喜欢

数学建模之层次分析法(含MATLAB代码)

一文搞定vscode编写go程序

Arduino controls a tiny hexapod 3D printing robot
![P6183 [USACO10MAR] The Rock Game S](/img/f4/d8c8763c27385d759d117b515fbf0f.png)
P6183 [USACO10MAR] The Rock Game S

Arduino控制微小的六足3D打印机器人
![21. [STM32] I don't understand the I2C protocol. Dig deep into the sequence diagram to help you write the underlying driver](/img/f4/2c935dd9933f5cd4324c29c41ab221.png)
21. [STM32] I don't understand the I2C protocol. Dig deep into the sequence diagram to help you write the underlying driver

Usage and usage instructions of JDBC connection pool

【 note 】 résoudre l'erreur de code IDE golang

六种常用事务解决方案,你方唱罢,我登场(没有最好只有更好)

RepLKNet:不是大卷积不好,而是卷积不够大,31x31卷积了解一下 | CVPR 2022
随机推荐
Intelligent metal detector based on openharmony
Go language programming specification combing summary
一文搞定vscode编写go程序
Hongmeng system -- Analysis from the perspective of business
I'm fat, huh
Noi / 1.4 07: collect bottle caps to win awards
Common redis data types and application scenarios
SQL Server learning notes
vlunhub- BoredHackerBlog Moriarty Corp
How to introduce devsecops into enterprises?
通过的英特尔Evo 3.0整机认证到底有多难?忆联科技告诉你
OSI seven layer model
把 ”中台“ 的思想迁移到代码中去
Memo 00
Appium automation test foundation - appium basic operation API (I)
Lesson 4 knowledge summary
Bugku alert
I spring web upload
Anti shake and throttling
20. [stm32] realize the function of intelligent garbage can by using ultrasonic module and steering gear