当前位置:Gxlcms > 数据库问题 > 查询数据库中表数量和各表中数据量

查询数据库中表数量和各表中数据量

时间:2021-07-01 10:21:17 帮助过:3人阅读

SELECT COUNT(*) TABLES FROM information_schema.TABLES WHERE table_schema = ‘替换成你的数据库名‘;

 

2.查询某个数据库下每个表有多少条数据

select TABLE_NAME, concat(truncate(data_length/1024/1024,2),‘ MB‘) as data_size,table_rows
from information_schema.tables where TABLE_SCHEMA = ‘替换成你的数据库名‘;

查询数据库中表数量和各表中数据量

标签:schema   class   for   data   查询   length   row   font   span   

人气教程排行