1.这INFORMATION_SCHEMA数据库被实现。它提供更好的编译使用标准的SQL因为INFORMATION_SCHEMA是标准的,不是一个MYSQL指定的扩展像SHOW。
2.SHOW语句语法扩展到支持一个where语句来描述那些行被展示
20.2 使用INFORMATION_SCHEMA来获得metadata
select table_name from information_schema.tables
where table_schema='INFORMATION_SCHEMA'
order by table_name;
展示的表如下:
1.CHARACTER_sets:关于可以获得字符集信息
2.每个字符集的集合
3.collation_character_set_applicability:那个字符集应用于每个集合的信息
4.COLUMNS:关于表中的列
5.COLUMN_PRIVILEGES:关于MySQL用户账户
>select column_name from information_schema.columns
where table_schema='INFORMATION_SCHEMA'
and table_name='views'
select table_schema,count(*) from information_schema.tables group by table_schema;
20.3 使用show和describe来获得元数据
show databases;
show tables from mysql;
show columns from CountryLanguage;
show KEYS from City\G
show character set;
show tables from information_schema;
20.4 使用mysqlshow来获得元数据
mysqlshow [options] [db_name [table_name [column_name]],触发mysqlshow使用--help操作
mysqlshow world.