Skip to content

Instantly share code, notes, and snippets.

@jules0x
Last active June 21, 2023 21:36
Show Gist options
  • Save jules0x/098d6a583a3c5ddbc0e157128eeb83c7 to your computer and use it in GitHub Desktop.
Save jules0x/098d6a583a3c5ddbc0e157128eeb83c7 to your computer and use it in GitHub Desktop.
SQL: Query row count for all tables in DB
SELECT table_name, table_rows
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA = 'db_name'
ORDER BY table_rows desc;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment