方法1:使用isnull替换select keyId,isnull(info,0) as info from test---方法2:使用case when 替换select keyId,case when info is null then 0 else info end as info from test---方法3:使用coalesce替换相应的值select keyId , coalesce(info,0) as info from test 程序员灯塔 转载请注明原文链接:把SQL查询结果为null值 替换为0 喜欢 (0)