--只要a,b,c,d有一个为空就不显示 
select * from a where a is not null and b is not null and c is not null and d is not null

解决方案 »

  1.   

    --只要a,b,c,d有一个不为空就显示
    select * from a where a is not null or b is not null or c is not null or d is not null 
      

  2.   

    我描述有点问题,现在改正一下:是为空的列不显示出来,比如d列为空,那么select出来的时候只有a,b,c 3列
      

  3.   

    你的描述还是不清楚,某行D为空,某行D不为空,咋办.
    反正就这两:
    is null
    is not null
    你自己组合去吧.
      

  4.   

    呵呵,多谢谢楼上的。 现在我把表的数据弄一下给你看看:
    a  b  c  d
    1  2  3  
    2  3  4  
    3  5  6明白了么?d列是空的,那么我们查询的时候只能把a,b,c3列查询出来,因为事先不知道哪一列是空的,故不能使用 select a,b,c from 表
      

  5.   

    要看你 哪一列为空得不显示,
    基本得写法是select * from A where a is not null or a !=""如果还有其他 条件直接在后面加or好了
    至于在后面加一个a!=""是因为有得字段经常会出现空字段,并不是所有的空字段都是null的,有一些清空的你就要用!=""来判断