Sybase Technical Library - Product Manuals Home
[Search Forms] [Previous Section with Hits] [Next Section with Hits] [Clear Search] Expand Search

Transact-SQL extensions [Table of Contents] Control-of-flow language

Transact-SQL User's Guide

[-] Chapter 1 SQL Building Blocks
[-] Transact-SQL extensions
[-] The compute clause

The compute clause

The Transact-SQL compute clause extension is used with the row aggregate functions sum, max, min, avg, and count 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."


Transact-SQL extensions [Table of Contents] Control-of-flow language