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