Prepared or callable statement has more than 2000 parameter markers. ; Prepared or callable statemen

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

开发板推荐:天空星STM32F407VET6开发板

超高性价比 STM32主控 | 超高主频 | 一板兼容百芯 | 比赛神器 | 沉金彩色丝印

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条
在这里插入图片描述

开发板推荐:天空星STM32F407VET6开发板

超高性价比 STM32主控 | 超高主频 | 一板兼容百芯 | 比赛神器 | 沉金彩色丝印

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值