开发者

Using MySQL, is there any way to dump the count of records in each of all 200 tables in a database?

开发者 https://www.devze.com 2022-12-31 16:54 出处:网络
Say if there is a database that has 200 tables, is there a quick way to see how many records are in each table,开发者_运维问答 if possible, sorted by the number of records descendingly?SELECT table_na

Say if there is a database that has 200 tables, is there a quick way to see how many records are in each table,开发者_运维问答 if possible, sorted by the number of records descendingly?


SELECT table_name,
       table_rows
  FROM `information_schema`.`tables`
 WHERE table_schema = '<Your Database Name>'
 ORDER BY table_rows DESC


Does show table status work for your problem? It has the row counts?

0

精彩评论

暂无评论...
验证码 换一张
取 消