偶一般是用2步:
select 'select '''||table_name
        ||''', case when count(*)=1 then 999999 else 0 end  from '
        ||table_name ||' where rownum=1; '
from user_tables
where rownum<10
/
执行上述sql生成的sql,执行过虑999999 即可;如果经常做表分析,直接从user_tables.NUM_ROWS中获得。