O'Reilly logo

Alison Balter's Mastering Access 2002 Enterprise Development by Alison Balter

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Aggregate Functions

You use aggregate functions to summarize table data. The aggregate functions available include COUNT, COUNT_BIG, SUM, AVG, MIN, and MAX. The following sections discuss each of these aggregate functions. You can find additional aggregate functions in Books On-line (online help for SQL Server).

COUNT

You use the COUNT function to count the number of rows in a table. It looks like this:

SELECT COUNT(*) AS CountOfCustomers FROM Customers
						

The example counts the number of rows in the Customers table (see Figure 6.10).

Figure 6.10. A SELECT statement that counts the number of rows in the Customers table.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required