NVL, NVL2, COALESCE, NULLIF

Published July 26, 2025 By Sai Sree Ram Gundepudi

NULL Handling Functions

NVL

SELECT first_name, NVL(commission_pct, 0) FROM employees;

NVL2

SELECT first_name, NVL2(commission_pct, 'Has Commission', 'No Commission') FROM employees;

COALESCE

SELECT COALESCE(NULL, NULL, 'default') FROM dual;

NULLIF

SELECT NULLIF(salary, 0) FROM employees;

Was this solution helpful?

Your feedback helps improve our technical knowledge repository.

Share this article