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

How to change the storage engine of a MySQL table?

WBOY
Release: 2023-08-31 09:45:04
forward
921 people have browsed it

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
Copy after login

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)
Copy after login

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!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template