Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> How to Find Total Rows by Owner
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
![]() |
![]() |