我是批量修改數(shù)據(jù),用foreach標(biāo)簽包住update語(yǔ)句,報(bào)錯(cuò)信息如下:文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-664237.html
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 'update biz_invoice_new
SET BUSINESS_CHANNEL = '02',
' at line 14
最后解決,在數(shù)據(jù)源配置中添加參數(shù):文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-664237.html
到了這里,關(guān)于mapper.xml中循環(huán)執(zhí)行多條語(yǔ)句時(shí)報(bào)錯(cuò),但是單獨(dú)拿SQL到數(shù)據(jù)庫(kù)卻可以執(zhí)行的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!