当前位置:网站首页>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
边栏推荐
- 22年字节跳动飞书人力套件三面面经
- 配置iptables
- Jeecg boot microservice architecture
- Quantexa CDI(场景决策智能)Syneo平台介绍
- STM32学习记录0008——GPIO那些事1
- CISSP certified daily knowledge points (April 13, 2022)
- 14 py games source code share the second bullet
- Machine learning practice - naive Bayes
- 22 year flying Book manpower Kit
- Log4j2 cross thread print traceid
猜你喜欢
CANopen STM32 transplantation
Spark performance optimization guide
机器学习理论之(7):核函数 Kernels —— 一种帮助 SVM 实现非线性化决策边界的方式
玻璃体中的硫酸软骨素
kettle庖丁解牛第17篇之文本文件输出
【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))
PowerDesigner various font settings; Preview font setting; SQL font settings
QT reading and writing XML files (including source code + comments)
STM32学习记录0008——GPIO那些事1
In win10 system, all programs run as administrator by default
随机推荐
K210 serial communication
WIN1 remote "this may be due to credssp encryption Oracle correction" solution
Daily network security certification test questions (April 13, 2022)
Imx6 debugging LVDS screen technical notes
From introduction to mastery of MATLAB (2)
Use of regular expressions in QT
listener.log
Daily CISSP certification common mistakes (April 18, 2022)
CISSP certified daily knowledge points (April 18, 2022)
Excel intercept text
ESP32 LVGL8. 1 - event (event 17)
机器学习实战 -朴素贝叶斯
The first leg of the national tour of shengteng AI developer creation and enjoyment day was successfully held in Xi'an
Use stm32cube MX / stm32cube ide to generate FatFs code and operate SPI flash
Robocode tutorial 7 - Radar locking
Log4j2 cross thread print traceid
【ACM】455. 分发饼干(1. 大饼干优先喂给大胃口;2. 遍历两个数组可以只用一个for循环(用下标索引--来遍历另一个数组))
QT notes on qmap container freeing memory
CISSP certified daily knowledge points (April 14, 2022)
In shell programming, the shell file with relative path is referenced