COALESCE
- Last Updated: January 17, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
Specifies a series of expressions and returns
the first expression whose value is not NULL. If
all the expressions evaluate as null, COALESCE returns
a NULL value.
Syntax
|
The COALESCE syntax is shorthand
notation for a common case that can also be represented in a CASE expression.
The following two formulations are equivalent:
|
|
Notes
- This
function is not allowed in a
GROUP BYclause. - Arguments to this function cannot be query expressions.
Example
This
example illustrates the COALESCE function:
|
Compatibility
SQL compatible