博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
MyBatis中对List<Object> 对象List的批处理插入操作
阅读量:4293 次
发布时间:2019-05-27

本文共 592 字,大约阅读时间需要 1 分钟。

<insert id="insertAddressPosition" parameterType="java.util.List">
        <selectKey keyProperty="p1" order="BEFORE" resultType="int">
            select seq_app_addresslist.nextval from dual
        </selectKey>
        insert into appuser.ADDRESS_POSITION_BACKUP
        (row_id,pos_id,pos_name,create_date,update_date)
        <foreach collection="list" item="pop" separator="union all"
            open="(" close=")">
            select
            #{p1},#{pop.ROLE_ID,jdbcType=VARCHAR},#{pop.ROLE_NAME,jdbcType=VARCHAR},
            sysdate,sysdate
            from dual
        </foreach>
    </insert>
参照此篇文章 http://ask.csdn.net/questions/155651
这篇文章也不错 http://blog.csdn.net/moneyshi/article/details/22807239

你可能感兴趣的文章
jQuery 效果 - 滑动
查看>>
对Java多态的深入理解
查看>>
javascript重点-表达式和运算符_优就业
查看>>
springmvc整合poi导出报表
查看>>
Oracle Data Guard延迟的原因
查看>>
java8 遍历数组的几种方式
查看>>
java基础知识(七)--Object类
查看>>
Object.prototype.toString_优就业
查看>>
JS之浏览器对象BOM
查看>>
分布式架构系列: 负载均衡技术详解
查看>>
python3安装scrapy
查看>>
python正则表达式入门一
查看>>
python正则表达式入门二
查看>>
scrapy运行
查看>>
XPATH入门
查看>>
python爬虫 CSS选择器
查看>>
正常关闭java程序
查看>>
查看linux核心数
查看>>
数据结构与算法三: 数组
查看>>
Activiti工作流会签二 启动流程
查看>>