查询结果存在为空给与一个默认值
nvl(h.date_type, '时间类型') as dateType
根据条件判断返回对应值
第一种:
case
when h.date_time= 0 then
'7天'
when h.date_time= 1 then
'半个月'
when h.date_time = 2 then
'一个月'
end as dateTime
第二种:
decode(h.yqsj,'0','7天','1','半个月','一个月)