- oracel一次查询多个sequence,批量查询sequence
SELECT SEQ.nextval
FROM dual
CONNECT BY ROWNUM <= #{batchSize}
- oracel批量插入-先批量获取sequenceId赋值给主键,再批量插入
<insert id="batchSave">
INSERT INTO NOTIFY_BREED(id, notify_id, breed_id)
<foreach collection="dataSet" open="(" item="item" separator=" union " index="index" close=")">
SELECT
#{item.id},
#{item.notifyId},
#{item.breedId}
FROM DUAL
</foreach>
</insert>
网友评论