当前位置: 代码迷 >> Sql Server >> SQL同一条件多参数的:where a=1 a=2
  详细解决方案

SQL同一条件多参数的:where a=1 a=2

热度:66   发布时间:2016-04-27 19:58:18.0
SQL同一条件多参数的:where a=1 a=2在线等
where   a=1     a=2   and   b=1

这样的怎么写在一起??
我说不明白,只能这样写出来,希望大家可以看得懂。
意思就是怎样能把a=1和2写在一起。另外还有别的条件。。

------解决方案--------------------
where a in (1, 2) and b = 1
------解决方案--------------------
where (a = 1 or a = 2) and b = 1
------解决方案--------------------
where (a=1 or a=2) and b=1
  相关解决方案