1. 当xxx变量为null时,转换为number为0,其他默认显示自己xxx:
select to_number(nvl(xxx,0)) from dual;
to_number(nvl(xxx,0))
from
dual;