从统计信息里面查询可能不是很准,直接还是在库里面查实际行数比较准确,这样需要编辑语句。:
1、生成要统计用户的SQL语句:
select \'select \'\'\'||table_name||\'\'\', count(1) from \'||owner||\'.\'||table_name||\' union\' from dba_tables where owner=\'替换成要统计的用户\';
2、生成脚本再套一层,例如:
select * from (
select \'DEPT\', count(1) from SCOTT.DEPT union
select \'EMP\', count(1) from SCOTT.EMP union
select \'SALGRADE\', count(1) from SCOTT.SALGRADE union
select \'BONUS\', count(1) from SCOTT.BONUS
)
收起