题如下:
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

解决方案 »

  1.   

    select a,b,c from table where (a =1 or a is null)
      

  2.   

    select a,b,c from table where c<>'c'
    select a,b,c from table where id<>2
    select a,b,c from table where b<>b
      

  3.   

    select a,b,c from table where (a =1 or a is null)
      

  4.   

    或者:
    select a,b,c from table where isnull(a,1)=1
      

  5.   

     select a,b,c from table where (a =1 or a is null)
      

  6.   


    select a,b,c from table where a =1 or a is null