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!

Bulk record count of multiple tables

1011786Jan 19 2016 — edited Jan 20 2016

Hi All,

New to plsql, need an procedure that take all tables in all schema and take corresponding  record counts of a table using dynamic SQL or bulk collect. Should be efficient code when dealing with crores of records.

Example:

Output:

Schemaname.tablename.   Counts

Asdddd.                                    17377

Sgggg.                                       17773

This need to be export to excel Sheet.

Try, with num_rows in all_tables & dba_tables tables. The num_rows column is a statics so it is not efficient

Taken ' select count(*) from tables' in an column after that not aware how to execute the particular statement and finding the records counts of mutiple tables say one lakhs record count of tables

Ex:

Column

Select count(*) from tab1

Select coun(*) from tab

Please advice us on the same and reach us if you need of any more inputs.

Warm Regards,

Sailesh Babu

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 17 2016
Added on Jan 19 2016
12 comments
3,066 views