sql>use information_schema;
sql>select concat("select """, TABLE_name,""", count(*) from ", TABLE_name," union all") from tables where TABLE_SCHEMA='huashan';
2、执行后输出: select "BackUpinfo", count(*) from BackUpinfo union all
select "CustomQuery", count(*) from CustomQuery union all
select "DATA_SOURCE", count(*) from DATA_SOURCE union all
select "DBTableList", count(*) from DBTableList union all
select "DBTableType", count(*) from DBTableType union all
select "DEVICE", count(*) from DEVICE union all
......