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: Vadim Tropasko <vtropash_at_us.oracle.com>
Date: Wed, 27 Jan 1999 12:53:43 -0800
Message-ID: <36AF7CD7.3BF6B348@us.oracle.com>


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

Original text of this message

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