MYSQL修改所有表的存储引擎格式语句
(编辑:jimmy 日期: 2024/11/15 浏览:3 次 )
复制代码 代码如下:
SELECT GROUP_CONCAT(CONCAT( 'ALTER TABLE ' ,TABLE_NAME ,' ENGINE=ARCHIVE; ') SEPARATOR '' )
FROM information_schema.TABLES AS t
WHERE TABLE_SCHEMA = 'userinfo' AND TABLE_TYPE = 'BASE TABLE'
-- 将语句粘出来,执行;
SELECT GROUP_CONCAT(CONCAT( 'ALTER TABLE ' ,TABLE_NAME ,' ENGINE=ARCHIVE; ') SEPARATOR '' )
FROM information_schema.TABLES AS t
WHERE TABLE_SCHEMA = 'userinfo' AND TABLE_TYPE = 'BASE TABLE'
-- 将语句粘出来,执行;
下一篇:超详细的SQL语句语法汇总