oracle 批量插入
原创
©著作权归作者所有:来自51CTO博客作者allsmallpig的原创作品,请联系作者获取转载授权,否则将追究法律责任
oracle批量擦恶如不支持mybtais&& mysql的那种;
正确的写法是 insert select fronm dual
比如
<insert id="batchInsertRecordList" parameterType="java.util.ArrayList" useGeneratedKeys = "false">
insert into T_IMAGELIST(ID, FILENAME, TYPE,BUSINESSID, COMPANYID)
<foreach collection="recordList" item="record" separator="union all">
select get_wsequences('T_IMAGELIST'), #{record.filename}, #{record.type}, #{record.businessid}, #{record.companyid} from dual
</foreach>
</insert>
’