mybatis oracle批量插入

时间:2014-07-03 13:58:35   收藏:0   阅读:232

<insert id="insertbatchinfotoemploees" parameterType="java.util.List">

     insert into INFOTOEMPLOEE

        select INFO_EMPLOEES.NEXTVAL,A.* from( <!--INFO_EMPLOEES为自增序列-->

        <foreach collection="list" item="item" index="index"

            separator="UNION">

            SELECT

            #{item.infoid}, #{item.empoyessid},

    #{item.infostate}

            from dual

             </foreach>

        ) A

 </insert>


mybatis oracle批量插入,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!