Cause: java.sql.SQLException: Prepared or callable statement has more than 2000 parameter markers.
; Prepared or callable statement has more than 2000 parameter markers.; nested exception is java.sql.SQLException: Prepared or callable statement has more than 2000 parameter markers.
在批量更新的时候遇到这个错误,第一次遇到这个错误,所以记录一下,给大家避个坑 它说的意思是批量插入或者更新的时候集合里面的size大于2000,所以导致插入失败 我的解决方案是再分一下 每次批量处理 200条

本文记录了在Java中遇到的SQLException:PreparedStatement有超过2000个参数标记。作者分享了问题出现的原因,即批量操作时参数集合过大,以及解决方法——分批处理。

145

被折叠的 条评论
为什么被折叠?



