当前位置:网站首页>项目中批量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语句。特别是分号;
完美解决,还是百度发现的
边栏推荐
- Summary of the second lesson
- I spring and autumn blasting-1
- CSRF, XSS science popularization and defense
- Memo 00
- Bugku cyberpunk
- 具有倍数关系的时钟切换
- Li Kou today's question -729 My schedule I
- Good article inventory
- 21. [STM32] I don't understand the I2C protocol. Dig deep into the sequence diagram to help you write the underlying driver
- Verilog realizes the calculation of the maximum common divisor and the minimum common multiple
猜你喜欢
Optional parameters in the for loop
21. [STM32] I don't understand the I2C protocol. Dig deep into the sequence diagram to help you write the underlying driver
Bugku's Ah Da
Advanced level of static and extern
Creation and optimization of MySQL index
Transfer the idea of "Zhongtai" to the code
Bugku's eyes are not real
五种常见的咨询公司谈判策略以及如何维护自己的利益
Summary of the third class
P6183 [USACO10MAR] The Rock Game S
随机推荐
Information collection of penetration test
Verilog realizes the calculation of the maximum common divisor and the minimum common multiple
MySQL表字段调整
18.[STM32]读取DS18B20温度传感器的ROM并实现多点测量温度
RepLKNet:不是大卷积不好,而是卷积不够大,31x31卷积了解一下 | CVPR 2022
Data communication foundation OSPF Foundation
20. [stm32] realize the function of intelligent garbage can by using ultrasonic module and steering gear
I spring web upload
I spring and autumn blasting-1
MySQL overview
2.3 learning content
Go learning ----- relevant knowledge of JWT
Ionic Cordova project modification plug-in
MySQL table field adjustment
Li Kou today's question -729 My schedule I
F. Min cost string problem solving Report
Xiao Sha's arithmetic problem solving Report
Can gbase 8A view the location of SQL statement history?
Bugku's Ping
Bugku alert