Types of functions  Aggregates used with group by

Chapter 2: Transact-SQL Functions

Aggregate functions

The aggregate functions generate summary values that appear as new columns in the query results. The aggregate functions are:

Aggregate functions can be used in the select list or the having clause of a select statement or subquery. They cannot be used in a where clause.

Each aggregate in a query requires its own worktable. Therefore, a query using aggregates cannot exceed the maximum number of worktables allowed in a query (12).

When an aggregate function is applied to a char datatype value, it implicitly converts the value to varchar, stripping all trailing blanks. Likewise, a unichar datatype value is implicitly converted to univarchar.

The max, min, and count aggregate functions have semantics that include the unichar datatype.





Copyright © 2005. Sybase Inc. All rights reserved. Aggregates used with group by

View this book as PDF