Re: SQL EXPERTS ONLY
Date: 1996/07/30
Message-ID: <31FDF44F.1A41_at_uk.oracle.com>#1/1
2. Use some PL/SQL to fetch all the table name from user_tables and then loop thru each selecting count(*)
3. as below ...
Steve Cosner wrote:
>
> In article <4tip79$q5u_at_newsbf02.news.aol.com>,
> MGreen1962 <mgreen1962_at_aol.com> 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? <snip>
>
> Try:
>
> select 'Table1' "Table",count(*)" Rows " from table1
> UNION ALL
> select 'Table2' "Table",count(*)" Rows " from table2
> UNION ALL ... etc.
>
> HTH
> Steve Cosner
-- The statements and opinions expressed here are my own and do not necessarily represent those of Oracle Corporation.Received on Tue Jul 30 1996 - 00:00:00 CEST