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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Count record number for each tables of one user

Re: Count record number for each tables of one user

From: Jerry Gitomer <jgitomer_at_erols.com>
Date: Sat, 12 Feb 2000 00:03:22 -0500
Message-ID: <38A4E99A.864B8EFF@erols.com>


Dana Jian wrote:
>
> Hi,
>
> A very small question.
> Is there any easy way to count record number for each tables of one user?
> I'm not using the ANALYZE-command for those tables.
>
> I guess we can use the dynamic SQL statement, I'm pretty new to the Oracle,
> so wondering how to do it.
>
> Thanks a lot for any help!
> Dana
>
> djian_at_trasa.com

SPOOL COUNT_ALL.SQL
SELECT 'SELECT ']]'''||table_name||'''||', count(*) from '||table_name||';'
FROM user_tables;
SPOOL OFF
@COUNT_ALL It's ugly, but if I counted my ' correctly it will work.

--
Jerry Gitomer
Once I learned how to spell DBA, I became one. Received on Fri Feb 11 2000 - 23:03:22 CST

Original text of this message

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