Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

fetch only more than or equal to 10 million rows tables

455636Apr 10 2008 — edited Apr 11 2008
Hi all,

How to fetch tables has more than 10 million rows with is plsql? i got this from some other site I couldn't remember.
Somebody can help me on this please. your help is greatly appreciated.


declare
counter number;
begin
for x in (select segment_name, owner
from dba_segments
where segment_type='TABLE'
and owner='KOMAKO') loop
execute immediate 'select count(*) from '||x.owner||'.'||x.segment_name into counter;
dbms_output.put_line(rpad(x.owner,30,' ') ||'.' ||rpad(x.segment_name,30,' ') ||' : ' || counter ||' row(s)');
end loop;
end;
/

Thank you,
gg
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 9 2008
Added on Apr 10 2008
2 comments
438 views