MySQL中的数据字典用于代替原来的show命令。
mysql> use information_schema
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
所有的数据字典如下:
mysql> show tables;
+---------------------------------------+
| Tables_in_information_schema |
+---------------------------------------+
| CHARACTER_SETS
| COLLATIONS |
| COLLATION_CHARACTER_SET_APPLICABILITY
| COLUMNS
| COLUMN_PRIVILEGES
| KEY_COLUMN_USAGE
| PROFILING
| ROUTINES
| SCHEMATA
| SCHEMA_PRIVILEGES
| STATISTICS
| TABLES
| TABLE_CONSTRAINTS
| TABLE_PRIVILEGES
| TRIGGERS
| USER_PRIVILEGES
| VIEWS
+---------------------------------------+
17 rows in set (0.00 sec)

本文介绍了MySQL中数据字典的概念及使用方式,替代了传统的show命令。通过展示information_schema数据库中的多个表,如CHARACTER_SETS、COLUMNS、TABLES等,详细解释了如何查询数据库元数据。
4627

被折叠的 条评论
为什么被折叠?



