日期:2014-05-18  浏览次数:20719 次

如何用SQL语句判断一个数字字段为空呀
如何用SQL语句判断一个数字字段为空呀

------解决方案--------------------
好像不同的数据库系统对字段是否null有不同的判断
------解决方案--------------------
is null
------解决方案--------------------
is null
is not null

例:select * from testTable where c1 is null
------解决方案--------------------
select * from table where table.字段 is null and 其他条件
不知道是不是这个意思
------解决方案--------------------
is null
is not null
------解决方案--------------------
where col1= " "
------解决方案--------------------
orale 数据库 就是 where id is null 这样的啊id是number类型的
------解决方案--------------------
case when 字段名 is null then 1 else 0 end

是空返回1,不是空返回0
有可能不好用,别怪我啊~~~~~!
------解决方案--------------------
汗,null or not null

中国JavaEE技术交流社区-欢迎您的参与探讨!

-- 打造“中国JavaEE技术交流社区“,欢迎j2ee爱好者朋友们的踊跃参与!
http://www.aspwind.cn
------解决方案--------------------
通过 函数 nvl 来判断
------解决方案--------------------
oracle用
is null
is not null
select * from tab where tab.name is null
------解决方案--------------------
比较时使用关键字用“is null”和“is not null”。