Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » UltraLite - Database Management and Reference » UltraLite SQL Function Reference » Alphabetical list of functions

COT function [Numeric] Next Page

COUNT function [Aggregate]


Counts the number of rows in a group depending on the specified parameters.

Syntax 1

COUNT(
*
| expression
| DISTINCT expression
)

Parameters

*    Return the number of rows in each group.

expression    The expression for which to return the number of rows.

DISTINCT expression    The expression for which to return the number of distinct rows.

Remarks

Rows where the value is the NULL value are not included in the count.

See also
Standards and compatibility
Example

The following statement returns each unique city, and the number of rows with that city value.

SELECT City , COUNT(*) FROM Employees GROUP BY City;