If you don't absolutely need it in a plsql script, and you are just using the information for occasional review, this simple sqlplus script would work.
Save the following in a text file: buildscript.sql
set pagesize 0
connect schemaname/schemapswd
spool c:tablecnt.sql
SELECT 'select ''' || table_name || ': '', count(*) from ' || table_name || ';' from user_tables;
spool off
@c:tablecnt
In Sqlplus, run the buildscript.sql file. The script will first build a new script file and then execute the new script giving the table name and its count. Remember to enter the correct schema name and password in the connect statement.
Last Wiki Answer Submitted: May 27, 2005 12:55 pm by Randym1,740 pts.
If you live outside the United States, by submitting your email address you consent to having your personal data transferred to and processed in the United States.