#查询表引擎
SELECT CONCAT(table_name,' ', engine)
FROM information_schema.tables WHERE table_schema="henryDB" AND ENGINE="MyISAM";
#生成修改sql
SELECT CONCAT('ALTER TABLE ',table_name,' ENGINE=InnoDB;') FROM information_schema.tables
WHERE table_schema="henryDB" AND ENGINE="MyISAM";
结果:
ALTER TABLE t_config ENGINE=InnoDB;
ALTER TABLE t_dic ENGINE=InnoDB;
ALTER TABLE t_files ENGINE=InnoDB;