|
-
a long way of doing it, and probba;y not very efficient either, but it works
set serveroutput on size 200000
declare
tabname varchar2(30);
tempcount number(10);
cursor tabs is select table_name from tabs;
tab_record tabs%ROWTYPE;
begin
for tab_record in tabs loop
fetch tabs into tabname;
exit when tabs%NOTFOUND;
dbms_output.put_line('Counting from ' ||tabname);
execute immediate 'select count(*) from '||tabname into tempcount;
dbms_output.put_line('Count = ' || tempcount);
dbms_output.put_line('.....................................................');
end loop;
end;
/
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|