Home » SQL & PL/SQL » SQL & PL/SQL » How can i get the record numbers of all schema's tables
How can i get the record numbers of all schema's tables [message #39245] Sun, 30 June 2002 18:08 Go to next message
wangsanjun
Messages: 13
Registered: June 2002
Junior Member
how to statistics the record number of all schema'tables?

thank you in advance.

sam from china
Re: How can i get the record numbers of all schema's tables [message #39257 is a reply to message #39245] Mon, 01 July 2002 08:14 Go to previous message
Todd Barry
Messages: 4819
Registered: August 2001
Senior Member
declare
  v_count  pls_integer;
begin
  for r in (select table_name from user_tables) loop
    execute immediate 'select count(*) from ' || r.table_name into v_count;
    dbms_output.put_line( 'Table: ' || r.table_name || ', Count: ' || v_count);
  end loop;
end;
/
Previous Topic: Portability of PL/SQL
Next Topic: DDL in PL/SQL
Goto Forum:
  


Current Time: Fri Apr 19 08:39:35 CDT 2024