首页 > 数据库技术 > 详细

sql 使用 in 后数据量太大报错

时间:2020-03-19 00:08:53      阅读:105      评论:0      收藏:0      [点我收藏+]

技术分享图片

 技术分享图片

 

 

 ibatis配置文件如下:

<select id="getPageInfo" parameterClass="map" resultClass="java.util.HashMap">
        select b.aab001,
            c.aab069,
            a.aac001,
            a.aac003,
            a.aac147,
            a.aac998,
            a.aac007,
            b.aac049,
            b.aae206,
            b.aae140,
            a.aic162,
            a.aac060
        from ac01 a, ac02 b, ae10 c
        where a.aac001 = b.aac001(+)
            and b.aab001 = c.aaz001(+)
        <isNotEmpty prepend="AND" property="aac001">   <!-- aac001 -->
            (A.AAC001 = #aac001# OR A.AAC998 = #aac001# OR A.AAC147 = #aac001#)
        </isNotEmpty>
        <isNotEmpty prepend="AND" property="aac001s">   <!-- aac001 -->
            (A.AAC001
            <iterate property="aac001s" prepend="IN" open="(" conjunction="," close=")">
                #aac001s[]#
            </iterate>
            OR A.AAC998
            <iterate property="aac001s" prepend="IN" open="(" conjunction="," close=")">
                #aac001s[]#
            </iterate>
            OR A.AAC147
            <iterate property="aac001s" prepend="IN" open="(" conjunction="," close=")">
                #aac001s[]#
            </iterate>
            )
        </isNotEmpty>
    </select>

 

sql 使用 in 后数据量太大报错

原文:https://www.cnblogs.com/moonsoft/p/12521137.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!