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: all table names with row counts?

Re: all table names with row counts?

From: Kai Horstmann <horst_at_werum.de>
Date: Thu, 28 Jan 1999 00:24:24 +0100
Message-ID: <36AFA028.426ECEC@werum.de>


Vadim Tropasko schrieb:
>
> I want to perform query like this
> select table_name, (select count(*) from table_name) from all_tables
> but cannot fugure out how to build join correctly. Any ideas?
> No procedural solution, please.

Hi Vadim
Try: (in Sql*Plus):

set echo off
set feedback off
set pagesize 0
set heading off
spool xx.tmp
select 'select count(*) from ' || owner ||'.'|| table_name || '  from all_tables;'
spool off
set echo on
set feedback on
set pagesize 25
set heading on
@xx.tmp

If you don't like procedural programming, try that awful hack. Don't forget to delete xx.tmp where you started sql*plus

Hope that helps
Kai Received on Wed Jan 27 1999 - 17:24:24 CST

Original text of this message

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