null不能作为bool比较条件,null本身就是一个"未知的值"
select * from a
where b is null或者
select * from a
where nvl(b,'NVL_NULL')='NVL_NULL'
select * from a
where b is null或者
select * from a
where nvl(b,'NVL_NULL')='NVL_NULL'
解决方案 »
- 在ibatis中使用oracle的sql语句,但是无法解析 case when ....end 语句
- Sequence重复问题如何解决
- 请教Oracle存储过程日期的比较,传入的日期包含时分秒,可是比较的时候Oracle自动把时分秒去掉了,只留下了年月日,请问为什么?
- 请高手帮忙在Metalink上查个bug号,谢谢!!附有trace文件
- update多条记录!
- 一个简单问题,在toad里新增加一个数据库连接
- 请教:如何在WINXP PRO(SP2)上同时安装ORACLE9I 和 ORACLE8I
- 如何看oracel上的一个存储过程执行了多长时间了(或进度情况)?
- sql/plus中如何查询当前连接的数据库,类似 show user看用户一样
- oracle8。17 的Management server (oms ) 的配置文件在哪,怎么配置
- 一SQL问题,我已日夜不成寐三日,求教高手解救
- 存储过程中能否用子查询?
应该为
where b is null (or where b is not null)
不为空 is not null
null 没有任可数据应该用 is null 或is not null 来判断 null
where b <>null 的結果是where null!
因為與null任何關系式得到的結果都是null,
用is nul或is not null 就可以了