1.获取指定数据库的表的数量
SELECT COUNT(*) TABLES, table_schema FROM information_schema.TABLES GROUP BY table_schema;
2.获取mysql下所有数据库表的数量
SELECT COUNT(*) TABLES, table_schema FROM information_schema.TABLES
WHERE table_schema = '数据库名' GROUP BY table_schema;
领取专属 10元无门槛券
私享最新 技术干货