-- 所有的表 select * from infomation.schema.tables;
-- dbname库下的表 select * from infomation.schema.tables where table_schema=‘dbname‘; -- 表名 表注释 表数据大小 索引量 select table_name, table_comment, concat(truncate(data_length/1024/1024,2),‘MB‘), concat(truncate(index_length/1024/1024,2),‘MB‘) from infomation.shcema.tables where table.schema=‘dbname‘;