mybatis 对oracle 批量插入操作

<insert id="insertBatch" parameterType="java.util.List">
  insert into SYS_ROLE2FUNCTION (ID,FUNCTIONID, ROLEID)
  <foreach collection="list" item="item" index="index"
   separator=" UNION ALL ">
   SELECT #{item.id,jdbcType=DECIMAL},#{item.functionid,jdbcType=DECIMAL}, #{item.roleid,jdbcType=DECIMAL} FROM DUAL     
  </foreach>
 </insert>

你可能感兴趣的:(mybatis)