Du kan bruge case
udtryk:
select last_name
, case when commision_pct is null then 'No Commission' else commision_pct end
from employees;
eller coalesce
:
select last_name
, coalesce(commision_pct, 'No Commission')
from employees;
eller nvl
:
select last_name
, nvl(commision_pct, 'No Commission')
from employees;
P.S. I tilfælde af commision_pct
's datatype er ikke varchar
du bør også bruge cast
eller to_char
.