decode函数用法
来源:互联网 发布:js href只能写在a中吗 编辑:程序博客网 时间:2024/06/04 08:43
原文来处
该函数可以接受可变的参数,具体参数情况如下:
decode(条件,值1,翻译值1,值2,翻译值2,...值n,翻译值n,缺省值)
该函数的含义如下:
if ( 条件=值1 )
return(翻译值1)
else if( 条件=值2)
return(翻译值2)
......
else if( 条件=值n )
return(翻译值n)
else
return(缺省值)
end if;
select decode('2',null,'1',2,(select 5 from dual),'4') from dual;
返回5
select decode(null,null,'1',2,(select 5 from dual),'4') fromdual ;
返回 1
注意: 这里的翻译值和缺省值可以使用表达式或子查询,但是不能返回多个值,否则会出现错误.
- decode 函数的用法
- decode 函数的用法
- decode 函数用法
- decode函数的用法
- decode函数的用法
- Decode 函数的用法
- decode 函数的用法
- decode函数用法
- decode函数用法
- Oracle-DECODE函数用法
- decode函数用法
- decode函数用法
- decode函数的用法
- Decode函数用法
- oracle decode.oracle 函数用法之decode
- oracle decode函数的用法
- 关于decode函数的用法
- Oracle中decode函数用法
- HTML页面中插入SWF文件
- flex接收flashvars参数值
- ubuntu安装java环境
- oracle里的自动增长字段,可以用触…
- quartz的触发器CronTriggerBean配置
- decode函数用法
- oracle ORA-01476:divisor is equal to zero
- Spring3中aop的配置方法
- hibernate二级缓存
- Strut1和Spring的整合
- fmt标签的使用
- 亚马逊推荐系统神话般60%转化率的背后
- DispatchAction
- JXL 读取excel数据