SQL 查询字段为值不为空
时间:2014-04-04 15:11:21
收藏:0
阅读:337
方法一
sql="select * from table where id<>null "
sql="select * from table where id<>null "
or
sql="select *
from table where len(id)>1"
方法二
"select 字段名序列 from talbe where 字段 is not null"
方法二
"select 字段名序列 from talbe where 字段 is not null"
由于 null 不是一个值,而是一个状态
所以我建议不要使用算术逻辑符号 “<>”
原文:http://www.cnblogs.com/t2010/p/3644764.html
评论(0)