Counting Rows :
COUNT(*) counts the number of rows in a table.
The syntax is
SELECT COUNT(*) from tbl_name;
Example :
mysql> select count(*) from student;
+----------+
| count(*) |
+----------+
| 5 |
+----------+
1 row in set (0.00 sec)
The above query will list the number of rows in the student table.
|