1、查看指定库的大小
use information_schema;
select concat(round(sum(data_length/1024/1024),2),'mb') as data from tables where table_schema='testdb';2、查看指定表的大小
select concat(round(sum(data_length/1024/1024),2),'mb') as data from tables where table_schema='testdb' and table_name='test';3、查看所有表的大小
select data_length/1024/1024,table_name as data from tables where table_schema='testdb';
本文介绍如何使用SQL查询指定数据库及其中特定表的大小,并提供查看数据库中所有表大小的方法。
1203

被折叠的 条评论
为什么被折叠?



