mysql查询表信息及数据量

mysql查询表信息及数据量

##查看所有表信息
SELECT * FROM information_schema.TABLES WHERE TABLE_SCHEMA = 'test'
##查看各个表数据量
SELECT table_name,table_rows FROM information_schema.tables WHERE TABLE_SCHEMA = 'test' ORDER BY table_rows DESC;
##查询schema的相关信息
SELECT * FROM information_schema.tables WHERE TABLE_SCHEMA = 'test' AND table_rows >0 ORDER BY table_rows DESC;

  

posted on 2021-01-14 10:56  lewisat  阅读(285)  评论(0编辑  收藏  举报

导航