使用mysql 统计函数 结果为null时返回值改为0

SELECT COALESCE(SUM(total),0)  FROM test_table

posted @ 2017-10-20 14:36  魔豆  阅读(6011)  评论(0编辑  收藏  举报