Low Orbit Flux Logo 2 F

How Can We Get The Number Of Records Or Rows In A Table Using MySQL?

It is easy to get the number of records or rows in a table using MySQL.

For example, if you have a table named employees you can just use the following command:



SELECT COUNT(*) FROM employees;

If you just want a count of the number of rows that match certain parameters, you can filter by column like this:



SELECT COUNT(*) FROM employees WHERE job_description = 'Super Commander';

This will tell you how many rows in the employee table have job_description set to “Super Commander”.

Video Instructions