统计MySQL中某个数据库中有多少张表(转载)
mysql> SELECT count(*) TABLES, table_schema FROM information_schema.TABLES
where table_schema = ‘db_production’ GROUP BY table_schema;
+——–+——————-+
TABLES | table_schema |
+——–+——————-+
169 | db_production |
+——–+——————-+
原文:http://blog.lxneng.com/?p=37