mybatis批量插入ORA-02287: sequence number not allowed here问题的解决

这样写就可以了

insert into T_POSS_MERCHANT_BENEFICIARY (ID, MERCHANT_ID, NAME,
LICENSE_TYPE_CODE, LICENSE_NO, EFFECT_DATE,
INVALID_DATE, IS_LONG_TIME, ADDRESS,
IS_DELETE, CREATE_TIME, UPDATE_TIME
)
SELECT SEQ_T_POSS_BENEFICIARY.nextval,a.* from(

SELECT
#{item.merchantId,jdbcType=DECIMAL} as a, #{item.name,jdbcType=VARCHAR} as b,
#{item.licenseTypeCode,jdbcType=VARCHAR} as c, #{item.licenseNo,jdbcType=VARCHAR} as d,
#{item.effectDate,jdbcType=VARCHAR} as e,#{item.invalidDate,jdbcType=VARCHAR} as f,
#{item.isLongTime,jdbcType=DECIMAL} as g, #{item.address,jdbcType=VARCHAR} as h,
0 as i, sysdate as j, sysdate as k
FROM dual

) a

这个要写到外边 SELECT SEQ_T_POSS_BENEFICIARY.、

参考
https://blog.csdn.net/qq525099302/article/details/43053291

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值