--只要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
select * from a where a is not null and b is not null and c is not null and d is not null
select * from a where a is not null or b is not null or c is not null or d is not null
反正就这两:
is null
is not null
你自己组合去吧.
a b c d
1 2 3
2 3 4
3 5 6明白了么?d列是空的,那么我们查询的时候只能把a,b,c3列查询出来,因为事先不知道哪一列是空的,故不能使用 select a,b,c from 表
基本得写法是select * from A where a is not null or a !=""如果还有其他 条件直接在后面加or好了
至于在后面加一个a!=""是因为有得字段经常会出现空字段,并不是所有的空字段都是null的,有一些清空的你就要用!=""来判断