Last active
October 8, 2015 15:08
-
-
Save dylansmith/d6c677d4be121a4fa880 to your computer and use it in GitHub Desktop.
Compare table counts across 2 MySQL databases
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT t1.TABLE_NAME, t1.TABLE_ROWS, t2.TABLE_ROWS | |
| FROM INFORMATION_SCHEMA.TABLES t1, INFORMATION_SCHEMA.TABLES t2 | |
| WHERE t1.TABLE_NAME = t2.TABLE_NAME | |
| AND t1.TABLE_SCHEMA = 'table1' | |
| AND t2.TABLE_SCHEMA = 'table2' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment