标签:info round mys mysq tab mat ble name select
1,查看所有数据库大小
use information_schema;
select concat(round(sum(DATA_LENGTH/1024/1024),2),‘MB‘) as data from TABLES;
2,查看指定数据库大小
use information_schema;
select concat(round(sum(DATA_LENGTH/1024/1024),2),‘MB‘) as data from TABLES where table_schema=‘dbname‘;
3,查看指定数据库中指定表的大小
use information_schema;
select concat(round(sum(data_length/1024/1024),2),‘MB‘) as data from tables where table_schema=‘dbname‘ and table_name=‘tbname‘;
标签:info round mys mysq tab mat ble name select
原文地址:https://www.cnblogs.com/fslnet/p/10830433.html