当前位置:Gxlcms > 数据库问题 > MySQL元数据查询

MySQL元数据查询

时间:2021-07-01 10:21:17 帮助过:15人阅读

查询数据库中所有表名

  1. <code>show tables;
  2. # 也可以
  3. select table_name from information_schema.tables where table_schema=‘xpydw‘ and table_type=‘base table‘;
  4. </code>

查询指定数据库中指定表的所有字段名column_name

  1. <code>select column_name from information_schema.columns where table_schema=‘xpydw‘ and table_name=‘users‘
  2. </code>

MySQL元数据查询

标签:name   ati   and   base   form   查询   字段名   col   type   

人气教程排行