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: Count(*) each table from user_tables

RE: Count(*) each table from user_tables

From: Ruth Gramolini <rgramolini_at_tax.state.vt.us>
Date: Fri, 2 Jul 2004 10:44:23 -0400
Message-ID: <002201c46043$111e99f0$8459699f@vttaxnet.tax.state.vt.us>


Here is a script which created a set of sqlplus statements which give the table_name and count(*) of each table from dba_tables for a particular schema_name. You can modify this to get each table in user_tables. Just spool the output and run it in sqlplus or cut and paste it and run it.

select 'select '''||table_name||''' , count(*) from schema_owner.'||table_name||';'
from dba_tables where owner='SCHEMA_OWNER';

HTH,
 
Ruth Gramolini
Oracle DBA
Vermont Department of Taxes
Phone 802-828-5708
Email rgramolini_at_tax.state.vt.us <mailto:rgramolini_at_tax.state.vt.us>  

-----Original Message-----

From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org]On Behalf Of Mihalis I. Tsoukalos Sent: Friday, July 02, 2004 2:33 AM
To: Oracle Mailing List
Subject: Count(*) each table from user_tables

Dear list,

I have the following question:

I want to count(*) every table from users_table table using SQL. I know how to do it in PL/SQL but not in SQL. Can you please help me do it?

many thanks in advance,
Mihalis.

--

 09:31:15 up 12 days, 22:35, 2 users, load average: 0.04, 0.03, 0.06



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

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--

Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html


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

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--

Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
Received on Fri Jul 02 2004 - 09:41:05 CDT

Original text of this message

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