nvl(expr1,expr2):如果expr1不为空,则选expr1,如果expr1为空,则选expr2的值
例如:
table tb_source:
select nvl(source_name, type) from tb_source where source_id = 1
select nvl(source_name, type) from tb_source where source_id = 2
nvl(expr1,expr2):如果expr1不为空,则选expr1,如果expr1为空,则选expr2的值
例如:
table tb_source:
select nvl(source_name, type) from tb_source where source_id = 1
select nvl(source_name, type) from tb_source where source_id = 2