bitscn.com
mysql指定数据库查询所有表行数
[sql] select concat('union all select ''', table_schema ,''' as db ,''',table_name,''' as tbname, count(1) as rows from ', table_schema ,'.',table_name ) as sqlexe from information_schema.tables as t where t.table_type = 'base table' and t.table_schema = 'addatacenter'
-- 因为直接访问视图时,mysql数据统计不精确。
bitscn.com