Oracle 查找数据库中有记录的表

2014-11-24 17:55:57 · 作者: · 浏览: 0

通过执行select NUM_ROWS,table_name from user_tables where NUM_ROWS>0,是可以达到效果的。

但是:有时候数据是不准的,原因是执行该查询的时候要先对表进行分析。

分析表的语法为:analyze table table_name compute statistics;


如何批量对表进行分析呢?

1、存储过程+游标,循环,OK没有问题,但是有点麻烦。