当前位置:网站首页>项目中批量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语句。特别是分号;
完美解决,还是百度发现的
边栏推荐
- Bugku alert
- Appium automation test foundation - appium basic operation API (II)
- Ionic Cordova project modification plug-in
- Noi / 1.5 37: mercenaries
- verilog实现计算最大公约数和最小公倍数
- Reproduce ThinkPHP 2 X Arbitrary Code Execution Vulnerability
- OSI seven layer model
- Creation and optimization of MySQL index
- [brief notes] solve the problem of IDE golang code red and error reporting
- Write a go program with vscode in one article
猜你喜欢
【 note 】 résoudre l'erreur de code IDE golang
【简记】解决IDE golang 代码飘红报错
I spring and autumn blasting-2
Data communication foundation NAT network address translation
verilog实现计算最大公约数和最小公倍数
Bugku easy_ nbt
21. [STM32] I don't understand the I2C protocol. Dig deep into the sequence diagram to help you write the underlying driver
Creation and optimization of MySQL index
18.[stm32] read the ROM of DS18B20 temperature sensor and realize multi-point temperature measurement
19.[STM32]HC_ SR04 ultrasonic ranging_ Timer mode (OLED display)
随机推荐
机械臂速成小指南(九):正运动学分析
Misc Basic test method and knowledge points of CTF
Common redis data types and application scenarios
Bugku's Ah Da
The computer is busy, and the update is a little slow
Appium automation test foundation - appium basic operation API (I)
Optional parameters in the for loop
Data communication foundation - Ethernet port mirroring and link aggregation
JS knowledge points-01
20. [stm32] realize the function of intelligent garbage can by using ultrasonic module and steering gear
MySQL 巨坑:update 更新慎用影响行数做判断!!!
P6183 [USACO10MAR] The Rock Game S
如何将 DevSecOps 引入企业?
Data communication foundation OSPF Foundation
Common MySQL interview questions (1) (written MySQL interview questions)
JS topic - console log()
go语言编程规范梳理总结
wyt 。。
Redis' transaction mechanism
Aike AI frontier promotion (7.5)