数据库
首页 > 数据库> > sql的查询多次in 操作的导致查询数据为空

sql的查询多次in 操作的导致查询数据为空

作者:互联网

  通过if else的方式解决
     <choose>
            <when test="site==5">
                and p.is_default=1
                and p.payment_method in('1','7','8','12','13','14')
            </when>
            <otherwise>
                and p.payment_method in('7','8')
            </otherwise>
        </choose>

  

标签:13,12,14,method,为空,sql,查询,payment
来源: https://www.cnblogs.com/q1359720840/p/16200534.html