Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Count(*) each table from user_tables
well, you could of course generate a SQL*Plus script to do the work for
you --
something like:
SQL> set heading off trimspool off ... off ... off ... off SQL> spool doit.sql SQL> select 'select count(*) from '||table_name||';'2 from user_tables;
Kind regards,
Lex.
-----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 10:49
To: oracle-l_at_freelists.org
Subject: Re: Count(*) each table from user_tables
On Fri, Jul 02, 2004 at 02:33:50PM +0530, Charudatta Joshi wrote:
>
> Hi,
>
> Here's one option, assuming you collect statistics regularly and/or you
> don't need exact row counts:
>
> SELECT table_name, num_rows FROM user_tables.
>
> Regards,
> Charu.
>
>
> -----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 12:03 PM
> 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.
Well, I would rather not use this method as I want to do it the other way (for self-learning purposes).
Any other ideas, please?
thanks,
Mihalis.
-- 12:47:03 up 13 days, 1:50, 2 users, load average: 0.00, 0.04, 0.02 ---------------------------------------------------------------- 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 ----------------------------------------------------------------- -- Binary/unsupported file stripped by Ecartis -- -- Type: text/x-vcard -- File: Lex de Haan.vcf ---------------------------------------------------------------- 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 - 05:21:05 CDT
![]() |
![]() |