| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: all table names with row counts?
Well, if I make
select count(*) from table_name
to be a function with 'table_name' argument, then
select table_name, count_rows(table_name) from all_tables
will do the job. I dont seem to need a cursor for that. I would have to
use dynamic SQL
in count_rows() function, though.
Jonathan Lewis wrote:
> Vadim Tropasko wrote in message <36AF6683.8816B009_at_us.oracle.com>...
> >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.
> >
>
> Does this also preclude using a procedure that returns a REF CURSOR
> so that you can use SQL*Plus to do the format and presentation side
> of the report ?
>
> Jonathan Lewis
> Yet another Oracle-related web site: www.jlcomp.demon.co.uk
Received on Wed Jan 27 1999 - 14:53:43 CST
![]() |
![]() |