How to replace null values with a text?

后端 未结 6 807
渐次进展
渐次进展 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:22

    Another alternative, quite simple and precise:

    nvl(to_char(commision_pct), 'No Commission') 
    

    Since, commision_pct is NUMBER data type, to_char will explicitly convert it into string.

提交回复
热议问题