U kunt case
. gebruiken uitdrukking:
select last_name
, case when commision_pct is null then 'No Commission' else commision_pct end
from employees;
of coalesce
:
select last_name
, coalesce(commision_pct, 'No Commission')
from employees;
of nvl
:
select last_name
, nvl(commision_pct, 'No Commission')
from employees;
P.S. In het geval commision_pct
's datatype is niet varchar
je moet ook cast
gebruiken of to_char
.