h1 mysql 中统计各表中数据行数的脚本
use information_schema;
select concat(
'select "',
TABLE_name,
'", count(*) from ',
TABLE_SCHEMA,
'.',
TABLE_name,
' union all'
) from tables
where TABLE_SCHEMA='testdb';
h1 mysql 中统计各表中数据行数的脚本
use information_schema;
select concat(
'select "',
TABLE_name,
'", count(*) from ',
TABLE_SCHEMA,
'.',
TABLE_name,
' union all'
) from tables
where TABLE_SCHEMA='testdb';
转载于:https://my.oschina.net/janl/blog/897315