set
pagesize 0
set
feedback off
set
echo off
set
termout off
spool
c:\temp.sql
select
'select rpad('''||owner||'.'||table_name||''',50),
to_char(count(*),''999999999999'') from '||owner||'.'||table_name||';' from
dba_tables;
spool
off;
set
termout on
@c:\temp.sql
You
can add whatever where clause to the above sql ... it formats 50 characters for
the owner/table_name and 10 digits for the count. Change to suite
you.
-----Original Message-----
From: Robertson Lee - lerobe [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 20, 2001 12:17 PM
To: Multiple recipients of list ORACLE-L
Subject: Quick select questionAll,Anyone know how to get a list of tablenames and the count of rows in themTABLE_NAME COUNT=========== ======LEE 10LEE1 25LEE2 17................etc etcI know it can be done if the tables are analyzed and from user_tables but was wanting to know how to do it from sqlplus.Tru648.0.5.0.0TIALee
The information contained in this communication is
confidential, is intended only for the use of the recipient
named above, and may be legally privileged. If the reader
of this message is not the intended recipient, you are
hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited.
If you have received this communication in error, please
re-send this communication to the sender and delete the
original message or any copy of it from your computer
system.
