The COUNT() function in SQL is a helpful tool for writing queries. It allows you to determine the number of rows in a result set that meet certain criteria. By using this function, you can easily calculate and display the desired information based on your specific requirements.
COUNT(*)
Counting rows in SQL is you can do with a function in SQL. The COUNT(*) function in SQL gives a count of Null values, Non-null values, and Duplicate values.
COUNT(Expression)
The COUNT(Expression) or COUNT(ALL Expression) function gives a count of rows except Null values.
COUNT(DISTINCT function)
The COUNT(DISTINCT function) gives a count of all rows except duplicates and Null values.





