Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: all table names with row counts?
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