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: Christopher M. Day <christopher.day_at_rdbms.freeserve.co.uk>
Date: Wed, 27 Jan 1999 21:38:48 +0000
Message-ID: <36AF8768.F912959A@rdbms.freeserve.co.uk>


Vadim,

You wouldn't be allowed to use dynamic SQL (DBMS_SQL) in the count_rows function as its purity level is not set.(See PRAGMA RESTRICT_REFERENCES)

Chris

Vadim Tropasko wrote:
>
> 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 - 15:38:48 CST

Original text of this message

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