以下是批量修改表数据引擎innodb的方法
top:BEGIN
declare in_table_name varchar(100);
declare done int default -1;
declare stop_Rescur cursor for select table_name from information_schema.tables where table_schema='nxpt' and table_type='base table';
/* 当游标到达尾部时,mysql自动设置done=1 */
declare continue handler for not found set done=1;
/* 打开游标 */
open stop_Rescur;
/* 循环开始 */
myLoop: LOOP
/* 移动游标并赋值 */
fetch stop_Rescur into in_table_name;
SET @table_name:=CONCAT("alter table ",in_table_name," engine=innodb;");
PREPARE STMT FROM @table_name;
EXECUTE STMT;
/* 循环结束 */
end loop myLoop;
close stop_Rescur;
END