select TABLE_NAME,table_rows,data_length+index_length, concat(round((data_length+index_length)/1024/1024,2),'MB') data from information_schema.tables where table_schema='数据库名';
查询mysql中一个数据库里各个表所占用空间的大小
最新推荐文章于 2021-02-04 10:35:03 发布
select TABLE_NAME,table_rows,data_length+index_length, concat(round((data_length+index_length)/1024/1024,2),'MB') data from information_schema.tables where table_schema='数据库名';