Re: SQL EXPERTS ONLY

From: Vijay Banda <vbanda_at_fldb1.fl.ford.com>
Date: 1996/07/30
Message-ID: <4tl3og$n8_at_eccdb1.pms.ford.com>#1/1


mgreen1962_at_aol.com (MGreen1962) wrote:
>I need to produce a report that shows how many records are in each table.
>i.e:
>
>Table_Name Number Recs
>----------------------------------------------------------------------
>Employees 413
>Customer 5257
>...
>
>How can I do this? Is there a datadictionary table that contains the
>number records in a table? Thanks to all that attempt to answer this
>question.
>
>Send suggestions to MGREEN1962_at_aol.com

Try this, but you neeed to do couple of changes to the spool file, before you run it..

/**************************Try This *********************************/

set pagesize 0
set feedback off;

spool new1.sql;

select 'Ttitle '||table_name||' select count(*)"number of recs" from '|| table_name ||';'
from user_tables;

spool off;

/***************************End Try This *****************************/

Note :- This will display out put like this

                       Table_name1

  Number of Records


     9999

                        Table_name2

  Number of Records


     90000

  and so on

  Hope fully this will help...... let me know !!!    Received on Tue Jul 30 1996 - 00:00:00 CEST

Original text of this message