Skip to Main Content

SQL & PL/SQL

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!

count table rows in loop

user8786417Aug 25 2015 — edited Aug 28 2015

Hi,

I am trying to create a pl/sql block that would loop through the user_tables and counting the number of rows and then printing them.

I am new to pl, and so far got the following

declare

 

    begin

        for i in (select table_name from USER_TABLES where table_name LIKE 'POPULATION%') loop

     

          count(*)

        end loop;

       -- dbms_output.put_line(cnt);

    end;

Can someone please point me in the right direction?

Thanks.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 25 2015
Added on Aug 25 2015
8 comments
4,711 views