当前位置:Gxlcms > mysql > mysql查询表的行数和空间使用及其它信息_MySQL

mysql查询表的行数和空间使用及其它信息_MySQL

时间:2021-07-01 10:21:17 帮助过:22人阅读

use information_schema;

select concat(round(sum(DATA_LENGTH/1024/1024), 2), 'MB') as data from TABLES;

select concat(round(sum(DATA_LENGTH/1024/1024), 2), 'MB') as data from TABLES where table_schema='dbname';

select table_schema,table_name,table_rows,data_length/1024/1024 from TABLES where table_schema='dbname'

记录

人气教程排行