您的位置:首页 > 数据库 > MySQL

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

2014-05-09 15:00 309 查看
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'

记录
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐