MySQL数据库中统计一个库中的所有表的行数?


今天公司两个远端的数据库主从同步有点问题,查看下wordpress库下所有表的表的条目?

mysql> use information_schema;
Database changed
mysql> select table_name,table_rows from tables where TABLE_SCHEMA = 'wordpress'order by table_rows desc;
+-----------------------+------------+
| table_name | table_rows |
+-----------------------+------------+
| wp_options | 130 |
| wp_usermeta | 18 |
| wp_posts | 4 |
| wp_postmeta | 2 |
| wp_links | 0 |
| wp_comments | 0 |
| wp_users | 0 |
| wp_commentmeta | 0 |
| wp_terms | 0 |
| wp_termmeta | 0 |
| wp_term_taxonomy | 0 |
| wp_term_relationships | 0 |
+-----------------------+------------+
12 rows in set (0.00 sec)

 

 

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM