当前位置: 移动技术网 > IT编程>数据库>Mysql > mysql中将null值转换为0的语句

mysql中将null值转换为0的语句

2017年12月12日  | 移动技术网IT编程  | 我要评论

复制代码 代码如下:

select
if(avg(cai.conversionsrate) is null,0,avg(cai.conversionsrate))
as conversionsrate
from campaign_info cai
where inserttime between '2011-02-01' and '2011-02-04' and googlecampaignid=23331401

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网