mybatis 对oracle 数据库用foreach实现 批量插入
<insert id="insertList">
insert into tableName(column1 , column2 , column3)
select t.* from(
<foreach collection="list" item="obj" index="index" sperator="union all">
(
select
#{obj.field} column1 ,
#{obj.field} column2,
#{obj.field} column3
from dual
)
</foreach>
)t
</insert>
温故而知新