Description
Returns the first non-null value: expression when it is not NULL, otherwise fallback. Accepted COALESCE-style alias (parser normalizes to COALESCE).
Syntax
NVL(expression, fallback)
Parameters
| Parameter | Description | Data Type | Required |
|---|---|---|---|
| expression | Column or expression to evaluate | Any | Yes |
| fallback | The fallback argument | Any | Yes |
Notes
- Behaves like
COALESCE(expression, fallback); parser normalizes toCOALESCE.
Example
SELECT
NVL(NULL, 'fallback')
FROM
my_table t
LIMIT
1;