首页 >数据库 >mysql教程 >mysql中将null值转换为0的语句_MySQL

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

WBOY
WBOY原创
2016-06-01 13:20:471151浏览

bitsCN.com


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

bitsCN.com
声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn