집 >데이터 베이스 >MySQL 튜토리얼 >mysql中将null值转换为0的语句_MySQL
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