Home  >  Article  >  Database  >  mybaits批量操作数据库

mybaits批量操作数据库

WBOY
WBOYOriginal
2016-06-07 14:59:541293browse

欢迎进入Oracle社区论坛,与200万技术人员互动交流 >>进入 ORACLE数据库: insert id="batchInsertRoleRMenu" parameterType="java.util.List" INSERT INTO QCMS_PUB_ROLE_R_MENU( MENU_ID, ROLE_ID ) ( foreach collection="list" item="item" index="in

欢迎进入Oracle社区论坛,与200万技术人员互动交流 >>进入

    ORACLE数据库:

   

    INSERT INTO QCMS_PUB_ROLE_R_MENU(

    MENU_ID,

    ROLE_ID

    ) (

   

    select

    #{item.menuId,jdbcType=NUMERIC},

    #{item.roleId,jdbcType=NUMERIC}

    from dual

   

    )

   

    mybaits等其他数据库:

   

    INSERT INTO QCMS_PUB_ROLE_R_MENU(

    MENU_ID,

    ROLE_ID

    )VALUES

   

    (

    #{item.menuId,jdbcType=NUMERIC},

    #{item.roleId,jdbcType=NUMERIC}

    )

   

   

mybaits批量操作数据库

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn