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

mac2022-06-30  80

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'

记录

转载于:https://www.cnblogs.com/yako/p/3718931.html

相关资源:查看表空间大小及已经使用的百分比
最新回复(0)