假设需要查询 select count * from tablename where a=...(a有4个可能的值) and b = ...(a有5个可能的值) 所以总共有20种组合
最后我需要的是20个值
如果一个个查的就有20条语句, 不知道有什么方法可以减少查询的语句数量,跪求
select count * from tablename where a in(xxx,xxx,xxx,xxx) and b in(xxx,xxx,xxx,xxx,xxx)
select count * from tablename where a in(xxx,xxx,xxx,xxx)
select count * from tablename where a in(xxx,xxx,xxx,xxx) or b in(xxx,xxx,xxx,xxx,xxx)
用or