Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is Coalesce a function of ANSI SQL

Tags:

sql

ansi-sql

Is the COALESCE a function of the ANSI SQL especification? Is it supported by the major relational databases?

like image 930
Rodrigo Avatar asked Jul 25 '18 15:07

Rodrigo


2 Answers

Yes:

https://www.mssqltips.com/sqlservertip/2689/deciding-between-coalesce-and-isnull-in-sql-server/

From the article:

Some think that you need to use COALESCE because it is the only one that adheres to the ANSI SQL standard.

and Yes.

like image 79
sniperd Avatar answered Sep 22 '22 09:09

sniperd


The ISO/ANSI SQL standard specification (ISO/IEC 9075-2:2016(E)) lists CASE and COALESCE as optional features:

F261     CASE expression
F261-04  COALESCE
like image 24
jarlh Avatar answered Sep 24 '22 09:09

jarlh