How to replace null values with a text?

后端 未结 6 791
渐次进展
渐次进展 2020-12-16 12:25

I need to display Employee last_name and their commission amount from employees table in Oracle SQL, but the condition is if it encounter NULL valu

6条回答
  •  时光说笑
    2020-12-16 13:17

    For Oracle

    select last_name, nvl(commission_pct,'No Commission')
    from employees;
    

    For SQL

    select last_name, isnull(commission_pct,"No Commission") as commission_pct
        from employees;
    

提交回复
热议问题