case
when x>0 then i
when x<0 then 0
alse -1
end case
when x>0 then i
when x<0 then 0
alse -1
end case
解决方案 »
- 新手求教数据分割插入问题
- oracle_ORA-01849: hour must be between 1 and 12
- 尝试加载 Oracle 客户端库时引发 BadImageFormatException。如果在安装 32 位 Oracle 客户端组件的情况下以 64 位模式运
- oracle 导表报错
- linux 下 oracle 11g 启动监听的问题,急!在线等
- SOS——数据库卡死问题
- 用动态SQL执行删除表的过程的问题?
- 送分~~~~~~~~~~~~~关于一个pr*C的问题 :ORA-24324: service handle not initialized
- [新人问题]如何给表和表建立关系?
- ora-12537 pl/sql 错误 大神求解
- 文件插入BLOB字段??
- PL/SQL连结字符串问题
用decode吧,
decode(sign(i),1,i,0)
表示,如果返回值大于0则返回i, 小于或等于0则返回0
decode(sign('abcd'-'ab'),1,'abcd','ab')
--
ab已选择 1 行