DECODE( expr val_1 , result_1 , val_2 , result_2 , val_3 , result_3 , )
expr
with val_n
and returns result_n
for the first val_n
that is equal to expr
. DECODE( expr val_1 , result_1 , … default_value )
decode
compares null
values differently than one is used to from Oracle in that decode
considers null
to be equal to null
. select decode( null , null, 42, 'xyz', 99, 17) from dual;