SQL coalesce takes two or more arguments and returns the first value that is not null or the SQL null value if all arguments are null.
SELECT COALESCE(first, second, 'default')
FROM ...The example returns the value of first if it is not null. Otherwise it returns the value of second if that is not null. Otherwise it returns the text default.
Related
Tutorials
Other conditional expressions:
Product specific features:
nvl,nvl2,ifnull,isnull,if,decode.
Normative References
The coalesce expression is defined in ISO/IEC 9075-2:2023 as mandatory F261-04.