table1 该表有a,b两个字段。假设没有 b = '123' 的记录,则 select a from table1 where b = '123' 结果是 null还是空值啊
select decode(a,null,'Y','N') as aa ,length(a) as bb from table1 where b = '123' 应该返回
aa bb
Y (空值)
可是什么也没返回啊。
...全文
14417打赏收藏
oracle decode函数的怪事。
table1 该表有a,b两个字段。假设没有 b = '123' 的记录,则 select a from table1 where b = '123' 结果是 null还是空值啊 select decode(a,null,'Y','N') as aa ,length(a) as bb from table1 where b = '123' 应该返回 aa bb Y (空值) 可是什么也没返回啊。