当前位置:网站首页>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
边栏推荐
- 比较DFS和BFS的优点和缺点及名称词汇
- About database: pgadmin4 editing SQL window
- Un des backtraders du cadre de quantification lit l'analyseur
- 21 | 面向流水线的指令设计(下):奔腾4是怎么失败的?
- 平衡二叉树学习笔记------一二熊猫
- 不同系统添加证书
- An example of CSRF attack defense in web application scenarios
- Three handshakes and four waves of TCP protocol and why------ One two pandas
- Redis learning journey --redis Conf details
- EF CORE执行SQL语句
猜你喜欢

21 | 面向流水线的指令设计(下):奔腾4是怎么失败的?

Redis Cluster - the underlying principle of slot assignment

First graphical interface

redis-7. Redis master-slave replication, cap, Paxos, cluster sharding cluster 02

在排序数组中查找元素的第一个和最后一个位置

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

Powerdispatcher reverse generation of Oracle data model
![[log framework] add user-defined parameters to the MDC implementation log](/img/94/5c0c51663f6a26d2ccf4a81047060f.jpg)
[log framework] add user-defined parameters to the MDC implementation log

Redis learning journey - cache exceptions (CACHE penetration, cache avalanche, cache breakdown)

Upgrade the project of log4j to log4j2
随机推荐
[tools for quickly creating MySQL stand-alone and cluster test environments] dbdeployer
Redis Cluster - the underlying principle of cluster execution commands
领先企业的管理实践证明,企业可持续发展的核心是什么?
21 | 面向流水线的指令设计(下):奔腾4是怎么失败的?
Questions about ETL: io trino. jdbc. TrinoDriver
How to stop PHP FPM service in php7
17 | 建立数据通路(上):指令+运算=CPU
[Yu Yue education] econometrics reference materials of Jiujiang University
redis-0. Introduction to redis and NiO principle (random talk)
Redis learning journey -- subscription and publishing
Sharp weapon tcpdump
Powerdispatcher reverse generation of Oracle data model
Redis master-slave replication - mentality detection mechanism
EF core execute SQL statement
[log4j2 log framework] sensitive character filtering
26 | Superscalar和VLIW:如何让CPU的吞吐率超过1
MySQL table cache most detailed notes
Time field comparison time size in MySQL
理財產品連續幾天收益都是零是怎麼回事?
P1434 [SHOI2002] 滑雪 (记忆化搜索