Home  >  Article  >  Database  >  How to change the storage engine of a MySQL table?

How to change the storage engine of a MySQL table?

WBOY
WBOYforward
2023-08-31 09:45:04807browse

How to change the storage engine of a MySQL table?

MySQL ALTER TABLE statement can change the storage engine of the 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 whether 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)

The above is the detailed content of How to change the storage engine of a MySQL table?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete