版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u011066470/article/details/88052803
1.查询指定数据库容量的大小
select concat(round(sum(data_length/1024/1024),2),'mb') as data from tables where table_schema='bike_order';
2.查询指定库中指定表的大小
select concat(round(sum(data_length/1024/1024),2),'mb') as data from tables where table_schema='baojia_bike' and table_name='bike';