SQL SERVER – Introduction to Rollup Clause

Posted by pinaldave on SQL Authority See other posts from SQL Authority or by pinaldave
Published on Wed, 24 Feb 2010 01:30:05 +0000 Indexed on 2010/03/12 1:37 UTC
Read the original article Hit count: 862

In this article we will go over basic understanding of Rollup clause in SQL Server. ROLLUP clause is used to do aggregate operation on multiple levels in hierarchy. Let us understand how it works by using an example. Consider a table with the following structure and data: CREATE TABLE tblPopulation ( Country VARCHAR(100), [State] VARCHAR(100), City VARCHAR(100), [Population (in Millions)] INT ) GO INSERT INTO tblPopulation VALUES('India', 'Delhi','East Delhi',9 [...]

© SQL Authority or respective owner

Related posts about Pinal Dave

Related posts about sql