1. 程式人生 > >mysql查詢資料庫表的資料行數

mysql查詢資料庫表的資料行數

檢視mysql某個資料庫下所有表的資料總條數

use information_schema;
select sum(TABLE_ROWS) from tables where TABLE_SCHEMA = 'db_name';

查詢出來的是每張表的行數

select table_name,table_rows from tables
where TABLE_SCHEMA = '資料庫名'
order by table_rows desc;