SELECT COALESCE(sum(num),0) AS pro_num FROM product;
mysql sum为空时默认显示0
最新推荐文章于 2022-05-25 21:02:31 发布
SELECT COALESCE(sum(num),0) AS pro_num FROM product;