nvl(expr1,exprl2)详解:
If expr1 is null, NVL returns expr2; if expr1 is not null, NVL returns expr1. The arguments expr1 and expr2 can have any datatype. If their datatypes are different, Oracle converts expr2 to the datatype of expr1 before comparing them. The datatype of the return value is always the same as the datatype of expr1, unless expr1 is character data, in which case the return value's datatype is VARCHAR2. In order to avoid the full table scan, the query can be rewritten in order to optimize by using a more selective filter. In this case, the expenditure group is rather selective, but the NVL() function prevented an index from being used.
If expr1 is null, NVL returns expr2; if expr1 is not null, NVL returns expr1. The arguments expr1 and expr2 can have any datatype. If their datatypes are different, Oracle converts expr2 to the datatype of expr1 before comparing them. The datatype of the return value is always the same as the datatype of expr1, unless expr1 is character data, in which case the return value's datatype is VARCHAR2. In order to avoid the full table scan, the query can be rewritten in order to optimize by using a more selective filter. In this case, the expenditure group is rather selective, but the NVL() function prevented an index from being used.
解决方案 »
- 请教下几个ORACLE的小问题
- 批量更新
- 哪位有oracle10 for win 的10.2.0.3 的补丁地址,给一个,急啊!!
- 如何用sql实现?
- 关于一个update语句的问题
- ORACLE用户登陆和权限的简单问题,大家帮我看下吧,谢谢
- oracle9i的企业管理器打开的时候如果想登录到oms,提示:无法连接到managerment server 192.168.0.91,是不是还要启动什么东西才行呀?
- oracle多表查询问题
- Oracle可以对查询字段的结果进行为空判断吗?
- 大神们帮忙看看,sql哪错了?用的是Oracle
- 关于ORACLE73在WIN2000上安装的问题,高手请进,高分相送。
- 嵌套表的存储表问题??
如果expr1是null,则返回expr2,否则返回expr1。