Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Select statement
In SQL*Plus:
spool cnt.sql
select 'select '''||owner||'.'||table_name||
''', count(*) from '||owner||'.'||table_name||';'
from dba_tables
order by owner, table_name
;
spool off
@cnt.sql
Another method: If you have recently analyzed your table with COMPUTE method, you can try the much faster:
select owner, table_name, num_rows from dba_tables order by 1,2;
Regards,
Giorgos
"Luis Fernandes" <lfernandes_at_gruposumol.pt> wrote in message
news:3b26318c.24258632_at_news.telepac.pt...
> How can i do this in Oracle?
>
> select table_name from dba_tables;
>
> and then
>
> select count(*) from ... each table resulting from first select?
>
>
> I'll appreciate your solutions..
>
> lfernandes_at_gruposumol.pt
Received on Tue Jun 12 2001 - 14:18:09 CDT
![]() |
![]() |