Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我继承了一组到处都有这种东西的脚本:
coalesce(''+ColumnName+'', '')
我了解合并的使用,但是有充分的理由不只是这样吗?
coalesce(ColumnName, '')
是的,您完全正确, coalesce(ColumnName, '') 等效于 coalesce(''+ColumnName+'', '') 无论 ColumnName 是否具有 varchar/char 等效数据类型。COALESCE 返回其参数中的第一个非空表达式。