Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Select Count off tables.

Select Count off tables.

From: Grahame Pearson <gpearson_at_metz.une.edu.au>
Date: Fri, 27 Jul 2001 11:58:58 +1000
Message-ID: <9jqhl3$plg$1@gruvel.une.edu.au>

How can I do this.

For example

If you firstly
select distinct table_name from all_tab_columns where owner = 'SYS'

You will return x number of rows

Including

     USER_TABLES
      USER_SOURCE

I want to have a query (PLSQL or SQL) where you can return the above record (most likely into a cursor) and the have another sql that does the following

Select count(*), first_table_returned
from first_table_returned;

then select count(*), second_table_name_returned from second_table_name_retuned;

etc, etc

So that you would get the following output (from the above example)

32,USER_TABLES
343,USER_SOURCE etc, etc

Any Ideas? Received on Thu Jul 26 2001 - 20:58:58 CDT

Original text of this message

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