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
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中将null值转换为0的语句 我用在了子句查询
本文链接:https://www.haomeiwen.com/subject/lbcxfktx.html
网友评论