select a,count(*) as b from c group by a后怎样再得到总count(*) select a,count(*) as b from c group by aunion select 'total',count(*) as b from c; 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select to_char(a),count(*) as b from c group by aunionselect 'overall',count(*) b from c; 试试这个吧:select a,count(*) from c group by rollup(a) 两种方法:1.group by rollup(a)2.group by cube(a)祝你好运 是不是应该这样?select 'total',count(*) as b from cunion select a,count(*) as b from c group by a 这么好用的东西我都不知道,xxrollupcube有什么区别亚 请问ORACLE 数据库 有按照模糊表名来查询统计的命令么? 新手问题:两个表查询 ORACLE 连接多个数据库问题 oracle运行一段时间(一个星期吧)后,监听就停止了。要重新启动pc机才可以。 fetch cur_a into cr; 我怎么把这个循环返回呢,怎么写输出呢,刚刚学,大家不要笑我 游标中sql传递变量问题 sql语句问题 Proc 中 Insert数据问题 送分--sql问题(100) Oracle update的相关问题 like问题,谢谢 菜鸟求救------关于时间问题
union
select 'overall',count(*) b from c;
select a,count(*) from c group by rollup(a)
1.group by rollup(a)
2.group by cube(a)
祝你好运
select 'total',count(*) as b from c
union
select a,count(*) as b from c group by a
rollup
cube
有什么区别亚