查看整个库的所有表;
mysql> select a.TABLE_NAME,a.TABLE_ROWS from TABLES as a where TABLE_SCHEMA = 'ultrax' order by TABLE_ROWS desc;
+-----------------------------------+------------+
| TABLE_NAME | TABLE_ROWS |
+-----------------------------------+------------+
| pre_common_district | 45051 |
| pre_common_setting | 406 |
| pre_common_block_style | 103 |
| pre_common_syscache | 102 |
.....................
| pre_common_member_verify_info | 0 |
| pre_ucenter_pm_members | 0 |
| pre_common_taskvar | 0 |
| pre_common_mailqueue | 0 |
+-----------------------------------+------------+
297 rows in set (0.04 sec)
查看单个表的行数;
mysql> select TABLE_ROWS from TABLES where TABLE_NAME='pre_common_district';
+------------+
| TABLE_ROWS |
+------------+
| 45051 |
+------------+
1 row in set (0.00 sec)
mysql统计某个库中所有的表的行数
最新推荐文章于 2024-03-05 17:44:48 发布