首頁 >資料庫 >mysql教程 >mysql中将null值转换为0的语句_MySQL

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

WBOY
WBOY原創
2016-06-01 13:20:471166瀏覽

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