COUNT(*) returns the number of rows in a specified table, and it preserves duplicate rows. It counts each row separately. This includes rows that contain null values.
What is the use of count (*)?
What is the use of * in SQL?
The second part of a SQL query is the name of the column you want to retrieve for each record you are getting. You can obviously retrieve multiple columns for each record, and (only if you want to retrieve all the columns) you can replace the list of them with * , which means “all columns”.
What does count (*) SQL function return?
The COUNT() function returns the number of rows that matches a specified criterion.