- Description: Replaces NULL with a specified value.
- Purpose: Handling NULL values in queries.
- Syntax:
NVL(expression, replacement_value)
- Parameters:
expression
: The value to check for NULL.replacement_value
: Value to return if the expression is NULL.
- Returns: The expression or replacement value.
- Example:
NVL(NULL, 'No Value')
returns'No Value'
. - Notes: Commonly used in calculations to avoid NULL results.
- Use Case: Displaying default values in reports.
Leave a Reply