The SQL COUNT function returns the number of values of the specified column.
Null values are not counted. This function can also be used to count the number of rows in the table.
In this example, we want to count the number of rows in a table.
SELECT COUNT(employeeID) as [Total Count]|
SELECT COUNT(*) as [Total Count]
The SQL COUNT function is used to count the number of rows in a table. You can also use other key words such as
DISTINCT and WHERE to further filter the data and make the results more specific to the range of data you are looking for.
Recommended Books & Training Resources