Using Count with All keyword in SQL Server 2008
In this article I describe how to use Count with All keyword in SQL
Count is one of the aggregate function in SQL Server 2008 and used to count the number of rows in a database table. Aggregate functions include avg, max, min, count and sum functions. Count can be used with two keyword, one is ALL and another is DISTINCT. Count with ALL keyword is used to return number of all rows in a database table. Count function does not count the null values from the column.
Return number of distinct rows from table
select COUNT(All F_Name)as TotalEmployee from Employee