当前位置:网站首页>Coalesce() function
Coalesce() function
2022-06-13 07:38:00 【_ seven seven】
sql Medium COALESCE() function
about Oracle database , Generally, the functions that often deal with null values are NVL, and mysql What is often used in ifnull, These two functions are similar , It's all derived from a function , That's it COALESCE() function .
COALESCE() function Definition : Returns the first non in the list null Value of expression . If all expressions evaluate to null, Then return to null.
COALESCE() Functions have two uses :
1.COALESCE ( expression1, expression2 );
2.COALESCE ( expression1, expression2, ... expression-n );
The first one is equivalent to Oracle Medium nvl perhaps mysql Medium ifnull, The form of the expression is :
CASE WHEN expression1 IS NOT NULL THEN expression1
ELSE expression2
END;
The second can include n Expression , Indicates that if the first one is not empty, the first one will be taken , Otherwise, judge the next , And so on , If all are empty , Then return to null value .
Attention should be paid to :vertica Empty string followed by null Values are not the same
边栏推荐
- Un des backtraders du cadre de quantification lit l'analyseur
- redis-1. Install redis with pictures and texts
- 全志V3S环境编译开发流程
- The management practice of leading enterprises has proved that what is the core of sustainable development of enterprises?
- Redis learning journey sentinel mode
- 20 | 面向流水线的指令设计(上):一心多用的现代CPU
- Hashtable source code analysis
- 19 | 建立数据通路(下):指令+运算=CPU
- Pdf to word
- [tools for quickly creating MySQL stand-alone and cluster test environments] dbdeployer
猜你喜欢

Redis persistence -- AOF

关于#数据库#的问题:PGADMIN4 编辑sql窗口问题

A troubleshooting process for database timeout caused by SQL misguided

C语言:如何给全局变量起一个别名?

IDS persistence ---rdb

JMeter encryption interface test

Table access among Oracle database users

2021-10-20

Classification of databases

20 | 面向流水线的指令设计(上):一心多用的现代CPU
随机推荐
[tools for quickly creating MySQL stand-alone and cluster test environments] dbdeployer
oracle问题,字段里面的数据被逗号隔开,取逗号两边数据
10. process communication
Awk use
One article of quantitative framework backtrader read analyzer
24 | 冒险和预测(三):CPU里的“线程池”
Find the first and last positions of elements in a sorted array
Hashtable source code analysis
Redis learning journey -- do you know the data types of redis?
Data desensitization tool advance tool Datamask
A solution to the problem that there is always a newline character when C merges multiple RichTextBox contents
平衡二叉树学习笔记------一二熊猫
redis-4. Redis' message subscription, pipeline, transaction, modules, bloom filter, and cache LRU
C language: how to give an alias to a global variable?
Performance tuning can't just depend on tapping the brain
nodejs文件模块fs
部署RDS服务
How idea breaks point debugging
[MySQL] rapid data deletion recovery tool - binlog2sql
Tidb source code series: immersive compilation of tidb