Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: How to find the tablename and the number of rows under each t
Hi Ranganath
Select table_name, mycount(table_name)
from user_tables
---where
function mycount(p_table_name in varchar) return number is v_sql varchar2(500) := 'select count(*) result from' || p_table_name;
If the tables are not too big I'd rather do a analyze. The above query could take a while.
Hope it helps
Regards
Johan Locke
-----Original Message-----
From: ranganathk krishnaswamy [mailto:ranganathk_at_lgsi.co.in]
Sent: 04 January 2001 08:16
To: Multiple recipients of list ORACLE-L
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 - 01:53:43 CST
![]() |
![]() |