SELECT CONCAT('ALTER TABLE ',TABLE_SCHEMA,'.',TABLE_NAME,' DROP FOREIGN KEY ',CONSTRAINT_NAME,' ;') FROM information_schema.TABLE_CONSTRAINTS c WHERE c.TABLE_SCHEMA='wcp' AND c.CONSTRAINT_TYPE='FOREIGN KEY';
之后复制到文档里,就可以执行了!
select CONCAT('alter table ',table_name,' engine=MyISAM;') FROM information_schema.tables WHERE table_schema="wcp" AND ENGINE="INNODB";
之后复制到文档里,就可以执行了!