Oracle Grouping、Rollup 的简单用法
摘要:
现在有一张 employee2表。select grouping(t.division_id) a, grouping(t.job_id) b, t.division_id, t.job_id from employees2 t
group by rollup(t.division_id,t.job_id);select grouping(t.division_id) a, grouping(t.job_id) b, decode(grouping(t.division_id),1,'all division',division_id)division_id, ... 阅读全文
posted @ 2011-12-01 08:51 小土泥 阅读(8343) 评论(0) 推荐(0) 编辑