PL/SQL (MOSC)

MOSC Banner

table row count report for all tables

edited Feb 7, 2018 5:23AM in PL/SQL (MOSC) 8 commentsAnswered ✓

Hi

Many of you probably know this option Laurent option (with the PL/SQL function) ref- https://laurentschneider.com/wordpress/2007/04/how-do-i-store-the-counts-of-all-tables.html

create or replace function count_rows(table_name varchar2)

return varchar2 is

i number;

r sys_refcursor;

begin

open r for 'select count(*) c from '||table_name;

fetch r into i;

return i;

end;

/

select table_name,count_rows(table_name) from user_tables;

But actually i was looking some options without the function because i want it from the DG environment of the database

Any ideas or option are very welcome

Jesus

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center