What it does exactly. What this will return?
Asked
Active
Viewed 1,019 times
1
-
Note that an example SQL query would help us understand exactly what you are asking. Do you mean `select count(10) from MyTable`? – Paul Williams Dec 13 '17 at 21:05
-
Yes, that's my query. – Gokul Dec 13 '17 at 21:12
3 Answers
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
-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