LoginSignup
8
8

More than 5 years have passed since last update.

MyISAM形式のテーブルを一気にInnoDB形式に変更するSQLを作成するSQL

Last updated at Posted at 2013-06-02

別の管理者から引きついたテーブルがMyISAMになっていたので、
以下のSQLで一気にInnoDBに変更するSQLを作成して、InnoDBにしておいた。

SQLを作成するSQL
SELECT
  CONCAT("ALTER TABLE ", information_schema.`TABLES`.TABLE_NAME , " ENGINE InnoDB;") AS "SQL"
FROM
  information_schema.`TABLES`
WHERE
  information_schema.`TABLES`.TABLE_SCHEMA = "○○○○○○○○"
AND
  information_schema.`TABLES`.`ENGINE` = "MyISAM"
8
8
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
8