Select a column if other column is null
ISNULL function or the COALESCE function. They both do pretty much the same thing, however ISNULL only takes two parameters and COALESCE takes multiple parameters (returning the first non-null it encounters). Both try the first param, then the second, (and COALESCE continues on)
本文探讨了在数据库操作中处理NULL值的两种方法:ISNULL函数和COALESCE函数。ISNULL仅接受两个参数,而COALESCE可接受多个参数并返回第一个非空值。这两种函数在尝试第一个参数失败后会继续尝试下一个参数。
955

被折叠的 条评论
为什么被折叠?



