您的位置:首页 > 博客中心 > 数据库 >

mybatis oracle批量插入

时间:2022-03-10 17:52

<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

热门排行

今日推荐

热门手游