Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Quick select question
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
<SPAN
class=140041022-20062001>@c:\temp.sql
<SPAN
class=140041022-20062001>
<SPAN
class=140041022-20062001>
<SPAN
class=140041022-20062001>
<SPAN
class=140041022-20062001>
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.
<FONT face=Tahoma
size=2>-----Original Message-----From: Robertson Lee - lerobe
[mailto:lerobe_at_acxiom.co.uk]Sent: Wednesday, June 20, 2001 12:17
PMTo: Multiple recipients of list ORACLE-LSubject: Quick
select question
<SPAN
class=625121716-20062001>All,
<SPAN
class=625121716-20062001>
Anyone know how to
get a list of tablenames and the count of rows in them
<SPAN
class=625121716-20062001>
<SPAN
class=625121716-20062001>TABLE_NAME
COUNT
<SPAN
class=625121716-20062001>=========== ======
<SPAN
class=625121716-20062001>LEE10
class=625121716-20062001>LEE125
class=625121716-20062001>LEE2 17................etc etc
<SPAN
class=625121716-20062001>8.0.5.0.0
<SPAN
class=625121716-20062001>
<SPAN
class=625121716-20062001>
<SPAN
class=625121716-20062001>TIA
<SPAN
class=625121716-20062001>
<SPAN
class=625121716-20062001>Lee
The information contained in this
communication isconfidential, is intended only for the use of the
recipientnamed above, and may be legally privileged. If the reader of
this message is not the intended recipient, you arehereby notified that
any dissemination, distribution orcopying 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
computersystem.
Received on Wed Jun 20 2001 - 17:37:20 CDT
![]() |
![]() |