Skip to content

Instantly share code, notes, and snippets.

@gabrieldewes
Created February 10, 2017 17:35
Show Gist options
  • Save gabrieldewes/1ed64f434a8d462d5f4536552d82709d to your computer and use it in GitHub Desktop.
Save gabrieldewes/1ed64f434a8d462d5f4536552d82709d to your computer and use it in GitHub Desktop.
Get the number of tables and the total of rows of all tables in MySQL
SELECT SUM(TABLE_ROWS) AS 'Total de Linhas', COUNT(*) AS 'Total de Tabelas'
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA = 'databaseName';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment