decode()函数简介
来源:互联网 发布:短信平台和网络 编辑:程序博客网 时间:2024/05/16 10:41
主要作用:将查询结果翻译成其他值(即以其他形式表现出来,以下举例说明);
使用方法
·含义解释:
decode(条件,值1,翻译值1,值2,翻译值2,...值n,翻译值n,缺省值)的理解如下:
if (条件==值1)
then
return(翻译值1)
elsif (条件==值2)
then
return(翻译值2)
......
elsif (条件==值n)
then
return(翻译值n)
else
return(缺省值)
使用方法
Select decode(columnname,值1,翻译值1,值2,翻译值2,...值n,翻译值n,缺省值)From talbenameWhere …其中columnname为要选择的table中所定义的column,
·含义解释:
decode(条件,值1,翻译值1,值2,翻译值2,...值n,翻译值n,缺省值)的理解如下:
if (条件==值1)
then
return(翻译值1)
elsif (条件==值2)
then
return(翻译值2)
......
elsif (条件==值n)
then
return(翻译值n)
else
return(缺省值)
end if
阅读全文
0 0
- decode()函数简介:
- decode()函数简介
- decode()函数简介
- SQL中 decode()函数简介
- SQL中 decode()函数简介
- SQL中 decode()函数简介
- SQL中 decode()函数简介
- SQL中 decode()函数简介
- SQL中 decode()函数简介
- SQL中 decode()函数简介
- SQL中 decode()函数简介
- SQL中 decode()函数简介
- SQL中 decode()函数简介
- SQL中 decode()函数简介
- oracle中 decode()函数简介
- SQL中 decode()函数简介
- SQL中 decode()函数简介
- oracle中 decode()函数简介
- Hive的体系结构
- 解决视图(SQL查询语句)唯一ID问题
- EditText默认不获取焦点,默认不弹出键盘
- Ubuntu 14.04 无线网卡驱动安装mt7601
- Shader-ZTest, ZWrite
- decode()函数简介
- java后台导出excel
- 冒泡排序和选择排序
- 小白科普:分布式和集群
- CGJ02、BD09、西安80、北京54、CGCS2000常用坐标系详解
- python基础资料(Learn|Codecademy好用的工具)
- javascript模拟面向对象程序设计编程(一)
- Spark优化那些事(4)-关于spark.driver.maxResultSize的疑惑
- 直线电机取代丝杠的经济技术方案