Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: counting rows in all_tables ???????
Erik Oosterling wrote:
>
> Hello,
>
> i got a smaal problem but don't know how to start.
>
> P.
>
> I want to make a query which count all the rows in each table that
> ALL_TABLES returns.
>...............snip
> ERIK OOSTERLING
This comes from our friends at Oracle on their web site...
REM SQL Script:
-- Generating a report of all tables with their record counts -- Code File Name : count.sql -- Temporary File Name : tmp_count.sql (created when count.sql isexecuted)
-- The output is echoed to the screen as well. -- It creates a temporary file tmp_count.sql in the current directory. -- Change the table name USER_TABLES to ALL_TABLES or DBA_TABLES tochange
select 'set head off' from dual; select 'set pagesize 0' from dual; select 'set linesize 80' from dual; select 'set feedback off' from dual; select 'spool count.lst' from dual; select 'select '||'''List of Tables with their Record Counts as of'||to_char(sysdate,'DD-MON-YY HH24:MI:SS')||''''||'from dual;' from dual;
enjoy.......... Received on Thu Jul 24 1997 - 00:00:00 CDT