元数据

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.


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值