COALESCE返回第一个不是null的值,如果都是null则返回null。
例子:
select coalesce(log.resid,’’) from 表
如果resid值为null,则返回’’
如果resid值不为null,则返回log.resid;
coalesce函数可以用来处理null值。
COALESCE返回第一个不是null的值,如果都是null则返回null。
例子:
select coalesce(log.resid,’’) from 表
如果resid值为null,则返回’’
如果resid值不为null,则返回log.resid;
coalesce函数可以用来处理null值。