题如下:
select a,b,c from table
查询出来的结果是
a b c
-----------------
null bb cc
1 bbb ccc
2 b c现在要怎么加条件才能使得查询结果为
a b c
-----------------
null bb cc
1 bbb ccc本人试过 select a,b,c from table where (a =1 or a=null)这样不行出错
还有a 的类型是tinyint
select a,b,c from table
查询出来的结果是
a b c
-----------------
null bb cc
1 bbb ccc
2 b c现在要怎么加条件才能使得查询结果为
a b c
-----------------
null bb cc
1 bbb ccc本人试过 select a,b,c from table where (a =1 or a=null)这样不行出错
还有a 的类型是tinyint
select a,b,c from table where id<>2
select a,b,c from table where b<>b
select a,b,c from table where isnull(a,1)=1
select a,b,c from table where a =1 or a is null