企业中如何批量更改mysql中表的存储引擎?

阅读 47

2022-08-03

一、首先必须熟悉Mysql中有哪些基本的数据库,在mysql中database等价于schema,默认的基本库有四个:mysql,information_schema,performance_schema,sys。

 

 

二、sql语句如下:主要是获取某个库的所有表名,然后使用concat组合成一条条语句;

select concat( 'alter table ' ,table_name ,' engine=myisam; ') 
from information_schema.tables t
where table_schema
and table_type


精彩评论(0)

0 0 举报