Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle10g, Need to find number of rows in each table in a schema
"janu" <angani_at_gmail.com> a écrit dans le message de news: 1162579697.634588.94410_at_f16g2000cwb.googlegroups.com...
| Hi Gurus,
|
| I am looking for a stored procedure or package to find total number of
| rows in each table in a schema.
|
| Something like, you can pass the schema name ot the SP or may be simple
| query.
|
| Thank you
| RA
|
Set heading off
Set feedback off
Set pagesize 0
Set termout off
Set trimout on
Set trimspool on
Set recsep off
Set linesize 100
Column d noprint new_value date_
Spool tmp
Select 'Select '''||table_name||' : ''||count(*) from '||owner||'.'||table_name||';',
to_char(sysdate, 'YYYYMMDDHH24MISS') d
from dba_tables where owner=upper('&1')
order by table_name
/
Spool off
Spool count_&1._&date_
@tmp.LST
Spool off
Regards
Michel Cadot
Received on Fri Nov 03 2006 - 13:00:02 CST
![]() |
![]() |