例如查询出来的记录集如下:
A                 B       C
1                 2       3
2                         3
3                 2       
4                 2       3
5                 2       3我现在想吧B和C为空的记录筛选出去。怎么搞啊

解决方案 »

  1.   


    Select * from tb  where b is null or C is null 
      

  2.   

    Select * from tb  where b is null or C is null or b='' or c=''
      

  3.   

    select *
    from 表名
    where c is not null and b is not null
      

  4.   

    Select * from tb  where b is not null or C is not null 
      

  5.   

    Select * from tb  where ISNULL(b,'')='' OR ISNULL(C,'')=''
      

  6.   


    create table #tb (a int,b int)insert into #tb
    select 1,2 union all
    select 23,89 union all
    select 4,null union all
    select null,55 union all
    select null,null union all
    select 66,677select *
    from #tb
    select *
    from #tb
    where a is not null and b is not null
      

  7.   

    好像我没说清楚。。
    我最终要的记录集如下:
    A                B      C 
    1                2      3 
    4                2      3 
    5                2      3 
    B和C未空的都不要了
      

  8.   

    Select * from tb  where ISNULL(b,'')<>'' OR ISNULL(C,'')<>''