There are two problems here - (1) no "spool off" and (2) what happens if there is no synonym for the table. Try the following:
set pagesize 0
spool table_row_count
select 'select 'select '||''''||table_name||''''||', count(*) from '||owner||'.'||table_name||';' from dba_tables;
spool off
@table_row_count.lst
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.