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 -> How to Find Total Rows by Owner

How to Find Total Rows by Owner

From: Mike J McCall <mjmccall_at_my-dejanews.com>
Date: Thu, 18 Mar 1999 00:13:56 GMT
Message-ID: <7cpgfs$dan$1@nnrp1.dejanews.com>


Is there any way to find the total number of rows in all the tables for one owner ? In other words, how can I do an SQL "select count(*) from table1,table2,table3,...' that prints one number representing the combined number of rows in all tables?

I don't think a join or union is the answer. I also tried a cursor in PL/SQL that dynamically selects individual counts from each table, but this won't compile because the tablename cannot be a variable. I am looking to use the total number of rows as a simple aggregate metric for all owned tables.

Any ideas thanks in advance.

Software Developer from the Past

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Wed Mar 17 1999 - 18:13:56 CST

Original text of this message

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