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

Home -> Community -> Usenet -> c.d.o.server -> Re: Select statement

Re: Select statement

From: Giorgos Tsiamitas <gtsiam_at_gmx.net>
Date: Tue, 12 Jun 2001 19:18:09 GMT
Message-ID: <RVtV6.299$R42.9809@nreader1.kpnqwest.net>

In SQL*Plus:



set pagesize 9999
set feedback off
set heading off
set wrap off
set linesize 132

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



The 1st line of cnt.sql will give an error - ignore it. Note that all quotes in the select stmt are single quotes!

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

Original text of this message

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