如何在MySQL中使用WITH ROLLUP?

时间:2021-09-18 01:54:03

如下所示

SELECT 
COALESCE(ename,总计)
,SUM(sal)
FROM 
emp 
GROUP BY 
ename
WITH ROLLUP

相关文章