1.查詢某個數據庫下有多少張表
SELECT COUNT(*) TABLES FROM information_schema.TABLES WHERE table_schema = '替換成你的數據庫名';
2.查詢某個數據庫下每個表有多少條數據
select TABLE_NAME, concat(truncate(data_length/1024/1024,2),' MB') as data_size,table_rows
from information_schema.tables where TABLE_SCHEMA = '替換成你的數據庫名';