处理mysql中in条件大于1000条的问题

复制代码
WHERE xsfnsrsbh IN
<foreach collection="param.nsrsbhList" index="index" item="nsrsbh" open="("  close=")">
         <if test="index >0 ">
            <choose>
               <when test="(index % 1000) == 999">
                  ) or xsfnsrsbh in (
               </when>
               <otherwise>,</otherwise>
            </choose>
         </if>
         #{nsrsbh}
</foreach>
复制代码

 

posted @   yshy  阅读(291)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 地球OL攻略 —— 某应届生求职总结
· 提示词工程——AI应用必不可少的技术
· Open-Sora 2.0 重磅开源!
· 周边上新:园子的第一款马克杯温暖上架
历史上的今天:
2013-11-06 android:layout_weight属性的简单使用
2013-11-06 点击文本输入框弹出日期选择对话框
2013-11-06 禁用与启用Button点击
点击右上角即可分享
微信分享提示