查询mysql数据库表的内容占用的存储

select table_name, concat(round(sum(data_length/1024/1024),2),'MB') as data from information_schema.tables where table_schema='sjfx' group by table_name order by round(sum(data_length/1024/1024),2) desc;

Tips:上一条语句中 sjfx是数据库的名称,记得换成自己的数据库名称。

posted on 2020-12-10 14:58  红薯啦里去挖  阅读(152)  评论(0)    收藏  举报

导航