with rollup 是统计记录数量的意思,(中文意思是:汇总)
代码:
列出friuts表的结构及数据
在group by后使用with rollup
MYSQL代码:select f_id ,count(*) as Total from friuts group by f_name with rollup
效果图
with rollup 在最后添加了一个统计列
with rollup 是统计记录数量的意思,(中文意思是:汇总)
代码:
列出friuts表的结构及数据
在group by后使用with rollup
MYSQL代码:select f_id ,count(*) as Total from friuts group by f_name with rollup
效果图
with rollup 在最后添加了一个统计列