COUNT Aggregate Statement



Syntax:

SELECT COUNT(Column)
FROM TableName;


What does it do?

The COUNT aggregate will count all the rows in a table or all the rows that meet a WHERE clause criteria.


Example:

SELECT COUNT(CustomerID) AS CustomerCount
FROM Customers;


Results:

CustomerCount
5
HTML 5 Badge