SQL: COALESCE reference
19 March 2023 (Updated 19 March 2023)
On this page
In a nutshell
The COALESCE
function is used to return the first non-null value from a list of expressions.
Syntax
Example
Here, COALESCE
will return the first non-null value from column1
or column2
. If both are null, then 'default'
is returned.
Tagged:
MySQL
Thanks for your comment . Once it's approved, it will appear here.
Leave a comment