Regarding COUNT(*) function
The " COUNT(column_name)" would return the number of records in that particular field but if we use "COUNT(*)" function, from which field are the number of records counted?
Thanks in advance!
1 answers ( 0 marked as helpful)
Hi Meenakshi!
Thanks for reaching out.
The COUNT(*) returns the number of rows in a dataset using the SELECT statement. The function counts rows with NULL, duplicate, and non-NULL values. While, COUNT(column_name) counts the records only for this particular column, COUNT(*) counts all rows regardless the columns. All columns have the same length.
Hope this helps.
Best,
Tsvetelin