当前位置:网站首页>Usage of functions decode() and replace() in SQL
Usage of functions decode() and replace() in SQL
2022-04-23 18:35:00 【Fat sb】
Oracle Display the query results with other values , for example : Find out that the value of a field is abc, Can be replaced by 123 Show
grammar :
replace In general use
replace ( status , 'x' ,' male ' )
namely : take status All occurrences in the field x Replace with male .
replace Nesting uses
replace(replace(replace(t.STATUS,'0',' normal '),'1',' Pause '),'2',' stop it ')
namely : take status All occurrences in the field 0 Replace with normal ,1 Replace with pause ,2 Replace with stop .
decode usage
decode( Conditions , value 1, Return value 1, value 2, Return value 2,… value n, Return value n)
decode(status,'0',' normal ','1',' Pause ','2',' stop it ')
namely : take status All occurrences in the field 0 Replace with normal ,1 Replace with pause ,2 Replace with stop .
版权声明
本文为[Fat sb]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231834007037.html
边栏推荐
- Halo 开源项目学习(七):缓存机制
- 【ACM】455. Distribute Biscuits (1. Give priority to big biscuits to big appetite; 2. Traverse two arrays with only one for loop (use subscript index -- to traverse another array))
- Machine learning theory (7): kernel function kernels -- a way to help SVM realize nonlinear decision boundary
- Robocode tutorial 7 - Radar locking
- Quantexa CDI(场景决策智能)Syneo平台介绍
- ctfshow-web362(SSTI)
- Test questions of daily safety network (February 2024)
- QT curve / oscilloscope customplot control
- 机器学习理论之(7):核函数 Kernels —— 一种帮助 SVM 实现非线性化决策边界的方式
- How to ensure the security of futures accounts online?
猜你喜欢

With the use of qchart, the final UI interface can be realized. The control of qweight can be added and promoted to a user-defined class. Only the class needs to be promoted to realize the coordinate

MATLAB从入门到精通(二)

Jeecg boot microservice architecture

MATLAB小技巧(6)七种滤波方法比较

Robocode tutorial 8 - advanced robot

Custom prompt box MessageBox in QT

Halo 开源项目学习(七):缓存机制

On iptables

【ACM】376. Swing sequence

纠结
随机推荐
根据快递单号查询物流查询更新量
Software test summary
教你用简单几个步骤快速重命名文件夹名
Query the logistics update quantity according to the express order number
Quantexa CDI(场景决策智能)Syneo平台介绍
Using transmittablethreadlocal to realize parameter cross thread transmission
CISSP certified daily knowledge points (April 13, 2022)
According to the result set queried by SQL statement, it is encapsulated as JSON
22 year flying Book manpower Kit
Can filter
14 py games source code share the second bullet
QT reading and writing XML files (including source code + comments)
ctfshow-web361(SSTI)
昇腾 AI 开发者创享日全国巡回首站在西安成功举行
CISSP certified daily knowledge points (April 11, 2022)
STM32: LCD显示
【ACM】376. 摆动序列
使用晨曦记账本,分析某个时间段每个账户收支结余
机器学习理论之(7):核函数 Kernels —— 一种帮助 SVM 实现非线性化决策边界的方式
Machine learning theory (7): kernel function kernels -- a way to help SVM realize nonlinear decision boundary