自学内容网 自学内容网

【mybatis解决oracle查询in超过1000条数据】

select * from table a
<where>
    <if test="list != null and list.size > 0">
        and a.name in
        <foreach collection="list" index="index" item="item" open="(" separator="," close=")">
            <if test="(index % 999) == 998">  ) or a.name in (</if> #{item}
        </foreach >
    </if>
</where>


原文地址:https://blog.csdn.net/Ike__/article/details/142362701

免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!