日期:2014-05-16  浏览次数:20482 次

查找oracle中的非空表
1.创建表
create table D
(
  NO   NUMBER(10),
  NAME VARCHAR2(200)
)

2.准备插入语句,

spool intert.sql;
select 'insert into D select count(*), ''' ||table_name||''' from '||table_name ||';' from dba_tables where owner='SIG_MPD';
spool off;


3.执行获得的sql语句
@insert.sql


4.查有记录的表名

SELECT NAME FROM D
WHERE NO>0 
order by NAME