SELECT sum(table_rows) FROM information_schema.tables
WHERE TABLE_SCHEMA = '数据库名称'
and table_name not in ('不查询的表名称')
ORDER BY table_rows DESC;
mysql统计一个数据库中所有表的数量总和
最新推荐文章于 2023-01-16 15:07:36 发布
SELECT sum(table_rows) FROM information_schema.tables
WHERE TABLE_SCHEMA = '数据库名称'
and table_name not in ('不查询的表名称')
ORDER BY table_rows DESC;