通过 show tables得到当前数据库中的所有表名,然后利用EXCEL生成 select 'tableName1' as tname,count(*) from tableName1 union all select 'tableName2' as tname,count(*) from tableName2 union all select 'tableName3' as tname,count(*) from tableName3 union all .... union all select 'tableNameN' as tname,count(*) from tableNameN
select 'tableName1' as tname,count(*) from tableName1
union all
select 'tableName2' as tname,count(*) from tableName2
union all
select 'tableName3' as tname,count(*) from tableName3
union all
....
union all
select 'tableNameN' as tname,count(*) from tableNameN