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: Edgar Chupit <edgar.chupit_at_rs.lv>
Date: Fri, 2 Jul 2004 09:44:54 +0300
Message-ID: <12398306.20040702094454@rs.lv>


Hello Mihalis,

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

SQL should know all referenced tables and fields upon parsing, since you have dynamic list of tables, that will be known only upon execution, you can not count all fields for all tables in user schema in single sql.

IF you have precise computed statistics for all tables, maybe you can use NUM_ROWS field of user_tables instead of count(*).

--

Best regards,
 Edgar



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 - 01:41:36 CDT

Original text of this message

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