Sintak:
NVL( value_in, replace_with )
NVL bekerja seperti kode PL/SQL berikut :
if (value_in is NULL) then
return replace_with;
else
return value_in;
end if;
Sample code:
select nvl(salary, 0)
from employees;
select nvl(ref_code,'Unknown')
from users;
return replace_with;
else
return value_in;
end if;
Sample code:
select nvl(salary, 0)
from employees;
select nvl(ref_code,'Unknown')
from users;