当前位置:网站首页>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
边栏推荐
- Database outline
- Functions about Oracle.
- 25 | 冒险和预测(四):今天下雨了,明天还会下雨么?
- Time field comparison time size in MySQL
- 【Emgu.CV】Emgu.CV.Example\OCR运行报错System.IO.FileNotFoundException:“未能加载文件或程序集“System.Drawing.Common
- C#合并多个richtextbox内容时始终存在换行符的解决方法
- [log4j2 log framework] modify dump log file permissions
- 5. interrupts and exceptions
- Redis learning journey - transaction
- 思路清晰的软光栅小引擎和四元数结合案例
猜你喜欢

2021-10-08

Find the first and last positions of elements in a sorted array

Redis learning journey - persistence

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

powerdisgner逆向生成oracle数据模型

C language: how to give an alias to a global variable?

redis-3. Redis list, set, hash, sorted_ set、skiplist

Compare advantages and disadvantages of DFS and BFS and name vocabulary

量化框架backtrader之一文读懂Analyzer分析器

Redis cluster parsing docker building redis cluster
随机推荐
MySQL does not recommend setting the column default value to null. Why on earth is this
Distributed transaction learning (I) preliminary understanding
QT reading SQLSERVER database
全志V3S环境编译开发流程
Socket programming 2:io reuse (select & poll & epoll)
Database outline
redis-6. Redis master-slave replication, cap, Paxos, cluster sharding cluster 01
Deploy RDS service
Sorting of numbers and strings
B. I Hate 1111 (记忆化搜索 数论
Data desensitization tool advance tool Datamask
Advanced MySQL: how to learn MySQL source code
平衡二叉树学习笔记------一二熊猫
A. Vacations (dp 贪心
Recommend several books on DBA promotion
First graphical interface (modified version)
redis-2. Redis string type & bitmap
B. I hate 1111 (mnemonic search number theory
Calculate running total / running balance
P1434 [SHOI2002] 滑雪 (记忆化搜索