Skip to content

Instantly share code, notes, and snippets.

@lavoiesl
Last active December 17, 2015 02:59
Show Gist options
  • Select an option

  • Save lavoiesl/5540284 to your computer and use it in GitHub Desktop.

Select an option

Save lavoiesl/5540284 to your computer and use it in GitHub Desktop.
List all MySQL tables using auto_increment
-- 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