查詢結果存在爲空給與一個默認值
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','半個月','一個月)