oracle nvl nvl2 decode
---------------------------------------------------------------------------------- NVL(E1, E2) 如果 E1 为 null , 返回 E2。 如果 E1 不是 null ,则返回 E1。 如果 E1 与 E2 都为 null ,返回 .NULL.。 E1 和 E2 可以是任意一种数据类型。 ---------------------------------------------------------------------------------- NVL2(E1, E2, E3) 如果E1为NULL,则函数返回E3,若E1不为null,则返回E2。 ---------------------------------------------------------------------------------- decode 的几种用法 1.使用decode判断字符串是否一样 DECODE(value,if 条件1,then 值1,if 条件2,then 值2,...,else 其他值) Sql测试: select aac001,decode(aac001,'0000000001','林海燕','0000000002','陈德财','others') as name from ac01