Computer >> Computer tutorials >  >> Programming >> MySQL

How can I change the storage engine of a MySQL table?


MySQL ALTER TABLE statement can change the storage engine of a table as follows −

mysql> ALTER TABLE Student ENGINE = 'InnoDB';
Query OK, 0 rows affected (0.90 sec)
Records: 0 Duplicates: 0 Warnings: 0

Now with the help of the following statement, we can check that the storage engine has been changed

mysql> SELECT ENGINE FROM information_schema.TABLES
  -> WHERE TABLE_SCHEMA = 'tutorial'
  -> AND TABLE_NAME = 'Student';

+--------+
| ENGINE |
+--------+
| InnoDB |
+--------+
1 row in set (0.01 sec)