mysql 数据库将将空值转换为实际值
1、问题:
在一些行中包含空值,需要使用非空的值来代替
2、解决办法:
1、使用COALESCE 函数来替换空值
select coalesce(column,0)
from t0
3、使用case 来替换空值
select case
when column is null then 0
else column
end
from t0
声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
阅读量:174
阅读量:30
阅读量:163
阅读量:162
阅读量:56