Différence entre NVL et NVL2 dans Oracle
/*
NVL checks if first argument is null and returns second argument.
NVL2 has different logic. If first argument is not null
then NVL2 returns second argument, but in other case it will
return third argument.
*/
select nvl(null, 'arg2') from dual
-- Result: arg2;
select nvl2('arg1', 'arg2', 'arg3') from dual
-- Result: arg2
select nvl2(null, 'arg2', 'arg3') from dual
-- Result: arg3
Tiny Coders