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