COUNT(*) function

COUNT(*) is an aggregate function that counts the number of rows accessed. No NULLs or duplicates are eliminated. COUNT(*) does not operate on an expression.

See Aggregates (set functions) for more information about these functions.

Syntax

COUNT(*)

The resulting data type is INTEGER.

Example

-- Count the number of rows in the Flights table
SELECT COUNT(*)
FROM Flights