欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

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

程序员文章站 2022-06-17 20:44:59
...
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
相关标签: mysql null