Transact-SQL extensions  Control-of-flow language

Chapter 1: SQL Building Blocks

compute clause

The Transact-SQL compute clause extension is used with the row aggregate functions sum, max, min, avg, count, and count_big to calculate summary values. Queries that include a compute clause display results with both detail and summary rows. These reports resemble those produced by almost any database management system (DBMS) with a report generator. compute displays summary values as additional rows in the results, instead of as new columns. The compute clause is covered in Chapter 3, “Using Aggregates, Grouping, and Sorting.”





Copyright © 2005. Sybase Inc. All rights reserved. Control-of-flow language

View this book as PDF