(1)INFORMATION_SCHEMA
select (sum(data_length) + sum(index_length))/(1024*1024) from INFORMATION_SCHEMA.`TABLES` where table_schema = 'your_table_schema' and table_name like 'your_table_name';
(2)show table status like '';
以上的代码会打印出表的相关信息,将相关字段相加即可。