use information_schema;
select table_name,table_rows from tables
where TABLE_SCHEMA = 'testdb'
order by table_rows desc;
本文介绍了一种使用SQL语句查询特定数据库(本例为testdb)中各表的行数的方法,并按行数降序排列。通过执行简单的SQL脚本,可以有效地获取数据库表的数据规模。
use information_schema;
select table_name,table_rows from tables
where TABLE_SCHEMA = 'testdb'
order by table_rows desc;

被折叠的 条评论
为什么被折叠?