Last active
December 17, 2015 02:59
-
-
Save lavoiesl/5540284 to your computer and use it in GitHub Desktop.
List all MySQL tables using auto_increment
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
| -- Find all MyISAM tables using AUTO_INCREMENT | |
| SELECT TABLE_SCHEMA, TABLE_NAME | |
| FROM information_schema.TABLES | |
| WHERE | |
| ENGINE = 'MyISAM' | |
| AND AUTO_INCREMENT IS NOT NULL | |
| AND TABLE_SCHEMA NOT IN ('mysql', 'phpmyadmin', 'test') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment