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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: How to find the tablename and the number of rows under each table

Re: How to find the tablename and the number of rows under each table

From: Leonardo Fernandez <lfernand_at_cmsenergy.com>
Date: Thu, 4 Jan 2001 08:43:01 -0500
Message-Id: <10731.125698@fatcity.com>


Hi Ranganathk,
You could do the following in Sql*Plus

spool rows_in_tables.sql
select 'select count(*) '||table_name||' from '||owner||'.' ||table_name||';'
from dba_tables
where owner = 'SCOTT';
spool off

After
edit file rows_in_tables.sql and eliminate the garbages and ... @rows_in_tables

"ranganathk krishnaswamy" <ranganathk_at_lgsi.co.in>@fatcity.com on 04/01/2001 01:15:36 AM

Please respond to ORACLE-L_at_fatcity.com

Sent by: root_at_fatcity.com

To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com> cc:
Subject: How to find the tablename and the number of rows under each table

      without analyzing the tables

Dear DBA Gurus,

     I want to find the tablename and the number of rows in each table under a
particular schema without analyzing the table. I know this can be done after analyzing the table computing the statistics and then querying the user_tables view for the columns table_name and num_rows. Any other SQL query using tab or any other view? Any response in this regard will be highly appreciated.

TIA and regards,

Ranganath

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: ranganathk krishnaswamy
  INET: ranganathk_at_lgsi.co.in

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists

--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Thu Jan 04 2001 - 07:43:01 CST

Original text of this message

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