查看数据库 Company 中所有表使用的存储引擎是什么.
这部分的信息存储在 information_schema 数据库的表 tables 中.
mysql> SELECT table_catalog, table_schema, table_name, engine
-> FROM information_schema.tables
-> WHERE table_schema='Company';
+---------------+--------------+---------------+--------+
| table_catalog | table_schema | table_name | engine |
+---------------+--------------+---------------+--------+
| def | company | department | MyISAM |
| def | company | dependent | MyISAM |
| def | company | dept_location | MyISAM |
| def | company | employee | InnoDB |
| def | company | project | MyISAM |
| def | company | works_on | MyISAM |
+---------------+--------------+---------------+--------+
6 rows in set (0.00 sec)
写一个存储过程, 将Company数据库中所有不是 InnoDB 引擎的数据表都改为 InnoDB 引擎.