select 编号,decode(状态,'新增',1,null) as '新增',decode(状态,'撤销',1,null) as '撤销',decode(状态,'故障',1,null) as '故障' from test01
解决方案 »
- Oracle 10.1和10.2 的都有哪些区别啊???
- 紧急求救!!!ORA-14074: 分区界限必须调整为高于最后一个分区界限
- 请问为什么sql loader导入CSV文件后产生日志文件不能追加?
- 请问ORACLE中如何用SQL语句取得当前计算机名
- 100分 求教 简单问题
- 提示错误 tns:protocal adapter error pb65连oracle817时,用plsql是可以联的
- 请教各位高手,如何找到占用io资源较多的session
- 下面的SQL语句为什么不对?!
- sql语句
- 位图索引的问题
- Linux fedora core5 (FC5) 下面不能装 Oracle 10g 么?
- 关于表访问的问题,请进!
case 状态 when '新增' then '1' when '撤销' then 'null' when '故障' then 'null' end as 新增,
case 状态 when '新增' then 'null' when '撤销' then '1' when '故障' then 'null' end as 撤销,
case 状态 when '新增' then 'null' when '撤销' then 'null' when '故障' then '1' end as 故障
from test01
decode(状态,'新增','1','撤销','null','故障','null') as 新增,
decode(状态,'新增','null','撤销','1','故障','null') as 撤销,
decode(状态,'新增','null','撤销','null','故障','1') as 故障
from test01