统计MySQL中某个数据库中有几张表、表所含的列

来源:互联网 发布:java开发android应用 编辑:程序博客网 时间:2024/06/10 21:26

Shell代码
  1. mysql> SELECT count(*) TABLES, table_schema FROM information_schema.TABLES   
  2. where table_schema = 'db_production' GROUP BY table_schema;  
  3. +--------+-------------------+  
  4. | TABLES | table_schema      |  
  5. +--------+-------------------+  
  6. |    169 | db_production |   
  7. +--------+-------------------+  



where table_schema = 你的数据库名


显示表的列

show columns from tableName;


0 0
原创粉丝点击