update a,b
set a.name=b.name where a.id=b.id
coalesce(被查字段,默认值) null 时用
select Id,coalesce(num,0) as num from aaa
本文深入探讨了SQL中update语句的基本用法,并详细解释了如何使用COALESCE函数处理NULL值。重点讲解了设置条件、更新字段及NULL值处理技巧。
update a,b
set a.name=b.name where a.id=b.id
coalesce(被查字段,默认值) null 时用
select Id,coalesce(num,0) as num from aaa
2754

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