读书人

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

发布时间: 2012-01-30 21:15:58 作者: rapoo

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

读书人网 >SQL Server

热点推荐