第二種:查詢所有數據的大小
select concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data from information_schema.TABLES
第三種:查看指定數據庫的大小,比如說:數據庫apoyl
select concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data from information_schema.TABLES where table_schema='apoyl';
第四種:查看指定數據庫的表的大小,比如說:數據庫apoyl 中apoyl_test表
select concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data from information_schema.TABLES where table_schema='apoyl' and table_name='apoyl_test';