oracle和mybatis集成,批量插入
1、如下
<insert id="insertUsers" parameterType="java.util.List">
        INSERT ALL
        <foreach collection="list" item="user">
            INTO pms_user
            (
                userId,
                username,
                passwordHash
            )
            VALUES
            (
                #{user.userId, jdbcType=VARCHAR},
                #{user.username, jdbcType=VARCHAR},
                #{user.passwordHash, jdbcType=VARCHAR}
            )
        </foreach>
        SELECT * FROM dual
    </insert>
 
                     
                    
                 
                    
                
 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号