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=\'hivedb\';
查看指定表
select concat(round(sum(data_length/1024/1024),2),\'MB\') as data from tables where table_schema=\'busdata\' and table_name=\'syslog\';

 

版权声明:本文为asker009原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/asker009/p/10458082.html