1

What it does exactly. What this will return?

Gokul
  • 73
  • 8

3 Answers3

0

This function returns the number of rows that matches a specified criteria. For example if you search the products table and the query returned 10 rows, the function count(*) returns the value of 10.

Tom Aranda
  • 5,919
  • 11
  • 35
  • 51
Hugo Valenza M
  • 169
  • 1
  • 6
0

You can write any number, count(0) - count(999999) that means count(*)

-1

For example if you use this query:

select count(*) from users;

and this query return 10 rows, the count() function also return you this value.

you can put the name of column in count function and the count work only with the results with this column.

Hugo Valenza M
  • 169
  • 1
  • 6