Skip to content

Instantly share code, notes, and snippets.

@KINKCreative
Last active August 29, 2015 14:01
Show Gist options
  • Save KINKCreative/2987fc806dea66d44a44 to your computer and use it in GitHub Desktop.
Save KINKCreative/2987fc806dea66d44a44 to your computer and use it in GitHub Desktop.
Switch MySQL tables to INNODB
SELECT CONCAT('ALTER TABLE ', table_name, ' ENGINE=InnoDB;') AS sql_statements
FROM information_schema.tables AS tb
WHERE table_schema = 'database_name'
AND `ENGINE` = 'InnoDB'
AND `TABLE_TYPE` = 'BASE TABLE'
ORDER BY table_name DESC;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment