一、if else
(1)decode
decode( 值或表达式
,值1,结果1
,值2,结果2
,值3,结果3
,值4,结果4
,默认值
)
(2)case
二、空值判断
(1)nvl 、nvl2
nvl ( 可能空的字段 , 默认值 )
nvl2 ( 可能空的字段 , 非空用这个值 , 默认值 )
(2)nullif 、coalesce
nullif( 字段, 跟这个值相等也返回null )
coalesce( a,b,c,d,...... ) -- a空返回b,b空返回c,......