SELECT COALESCE(sum(num),0) AS pro_num FROM product;
mysql sum为空时默认显示0
最新推荐文章于 2024-01-15 15:42:22 发布
SELECT COALESCE(sum(num),0) AS pro_num FROM product;