ROLLUP enables a SELECT statement to calculate multiple levels of subtotals across a specified group of dimensions. It also calculates a grand total. ROLLUP is a simple extension to the GROUP BY clause, so its syntax is extremely easy to use. The ROLLUP extension is highly efficient, adding minimal overhead to a query.
select
deptno,
job,
sum(sal)
from
scott.emp
group by
rollup(deptno,job);
Output
select
deptno,
job,
sum(sal)
from
scott.emp
group by
rollup(deptno,job);
Output
good info
ReplyDeletecan u explain cube also??
hey good one..
ReplyDeleteThanx!
Oracle Applications
The given post explains the term ROLLUP used in Oracle. You get the exact definition of the term and why it is used for. The syntax for Rollup is also written which is very easy to understand. Given is the example for clearing the point.
ReplyDeleteThis is super cool. Thanks.
ReplyDeleteSummer Training For Electrical Student
ReplyDelete