Last active
August 29, 2015 14:20
-
-
Save Bogdaan/a4ef068b6ffbb8721d21 to your computer and use it in GitHub Desktop.
Innodb to MyISAM
This file contains 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
SET @DATABASE_NAME = 'name_of_your_db'; | |
SELECT CONCAT('ALTER TABLE `', table_name, '` ENGINE=MyISAM;') 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