case when 与decode
来源:互联网 发布:m1a59sep 知乎 编辑:程序博客网 时间:2024/05/09 20:22
select decode(null,
null,2,
3,3,
4) from dual;
-------------------
2
select case null
when null then 2
when 3 then 3
else 4
end from dual;
-----------------------
4
总结,一般这两种写法可以互换,但值得注意地是·如果表达式为NULL的情况,结果会不一样·
decode是函数,case是运算符,按Oracle的比较运算符法则有操作数是null则返回非真值。
null,2,
3,3,
4) from dual;
-------------------
2
select case null
when null then 2
when 3 then 3
else 4
end from dual;
-----------------------
4
总结,一般这两种写法可以互换,但值得注意地是·如果表达式为NULL的情况,结果会不一样·
decode是函数,case是运算符,按Oracle的比较运算符法则有操作数是null则返回非真值。
- case when 与decode
- case when 与 decode 用法
- decode与case when的区别
- DECODE,case when
- case when decode
- DECODE ROUND case when
- decode和case when
- decode 与 case when ** and ** then ** end 总结
- Oracle中decode函数与case when的使用
- Oracle中decode函数与case when的使用
- case when和decode的用法与区别
- Oracle中decode函数与case when的使用
- ORACLE 中 DECODE 与 CASE WHEN THEN 用法
- 【SQL基础】case when和decode的用法与区别
- decode和case when区别?
- case when和decode比较
- 行转列之decode、case when
- 等同decode函数的case when 语句
- FI--SAP财务成本知识库
- 用JAVA轻松操作properties文件
- bfin-xxx-gcc-4.3.1中auto-host.h的生成
- JAVA面试题解惑系列(二)——到底创建了几个String对象?
- COOKIE用法
- case when 与decode
- 验证码
- 爬虫 ajax网页
- ABAP如何自定义下拉列表
- 使用一些宏跟踪调试
- 别人修改夏普3.5寸TFT的经验
- IBM Appscan7.7 browser 如何访问带windows授权的网站?
- C#视频
- 高效管理和提取互联网信息