- INFORMATION_SCHEMA数据库下的表存储mysql服务器的元数据。
- INFORMATION_SCHEMA是个read only数据库。
一、查看某个数据库下的表
MySQL [db_test1]> SELECT table_name,table_type,engine
FROM information_schema.tables WHERE table_schema= 'db_test1' ORDER BY table_name;
+---------------------+------------+--------+
| table_name | table_type | engine |
+---------------------+------------+--------+
| contracts_a | BASE TABLE | InnoDB |
| contracts_b | BASE TABLE | InnoDB |
| contracts_c | BASE TABLE | InnoDB |
| contracts_d | BASE TABLE | InnoDB |
--------------+------------+--------+
15 rows in set (0.01 sec)