晨风

-------------------- 业精于勤,荒于嬉;行成于思,毁于随

导航

MySQL查询所有表的数据量

Posted on 2021-05-20 11:17  shenyixin  阅读(4453)  评论(0编辑  收藏  举报
#数据库中所有表的信息
SELECT * FROM information_schema.TABLES WHERE TABLE_SCHEMA = '数据库名'
#数据库中每个表的数据量
SELECT table_name,table_rows FROM information_schema.tables
WHERE TABLE_SCHEMA = '数据库名' ORDER BY table_rows DESC;