日期:2014-05-17 浏览次数:20786 次
select * from tb where field1||field2||field3||field4||field5||field6||field7||field8||field9 is not null
------解决方案--------------------
select * from 表名
where field1 is not null
and field2 is not null
and field3 is not null
and field4 is not null
and field5 is not null
and field6 is not null
and field7 is not null
and field8 is not null
and field9 is not null
;
感觉这个方法有点笨拙,不知道大家有社么简单的方法?
------解决方案--------------------
2楼的不能用来判断是否都不为null
使用||,只要有一个不为null,则连接的结果都不为null
------解决方案--------------------