Getting MySQL row count of all tables in a database with one query

A quick way to get the row count of all tables in a database is querying data from the information_schema database directly.

Example

SELECT 
    table_name, 
    table_rows
FROM
    information_schema.tables
WHERE
    table_schema = 'yourTable'
ORDER BY table_name;

Output (will be in the form of)

Share

You may also like...