Oracle COALESCE function

The COALESCE function returns first not null expression among the arguments. Minimum 2 arguments required.

If all expressions are null then it returns null.

Syntax:-

COALESCE (expr_1,expr_2,…expr_n)

Examples :-

1. select COALESCE(null,null,null,10) from dual;

would return 10.

2. select COALESCE(null,null,null) from dual;

would return null.

Related Posts

NVL
NULL
NVL2

Advertisements