mysql中将null值转换为0的语句
(编辑:jimmy 日期: 2024/11/18 浏览:3 次 )
复制代码 代码如下:
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
下一篇:从MySQL复制功能中得到的一举三得实惠分析