How to view the number of rows in all tables in MySQL?

To view the number of rows in all tables of a MySQL database, you can use the following SQL query:

SELECT TABLE_NAME, TABLE_ROWS
FROM information_schema.TABLES
WHERE TABLE_SCHEMA = 'your_database_name';

Replace the “your_database_name” above with the name of the database you want to query.

After executing the above SQL statement, a result set will be returned that includes the names of all tables and their corresponding number of rows.

bannerAds