Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Script for total number of rows

Re: Script for total number of rows

From: Bricklen Anderson <bricklen13_at_hotmail.com>
Date: 17 Apr 2002 15:06:09 -0700
Message-ID: <b416ca2d.0204171406.4735cbf8@posting.google.com>


how about this? (not very elegant I'm afraid):

set serveroutput on 1000000
set termout off
spool count_contents.sql
begin
for x in (select table_name from user_Tables) loop dbms_output.put_line('select count(*) '||x.table_name||' from '||x.table_name||';'); end loop;
end;
/
spool off
set termout on
@@count_contents.sql

bpinaki123_at_indiatimes.com (Pinaki) wrote in message news:<96eccafc.0204171012.558f7ae0_at_posting.google.com>...
> Hi,
> I am a beginner in Oracle.I need a script that will show the
> total number of rows in all the tables in a specific schema.I can
> select the "NUM_ROWS" along with the table_names from user_tables but
> for that I have to run "Analyze table t compute statistics" for each
> table and I want to avoid doing that. Is there any way I can write a
> PL/SQL script that I can store in the database which will retrieve the
> information I want...
>
> Thanks,
> Pinaki
Received on Wed Apr 17 2002 - 17:06:09 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US