Hello friends n gurus...
Oracle: 11g
OS: Linux
I have this very tricky questions which I am trying to solve but not able to get definite answers...
I did search on google... otn etc but not luck with my requirement...
Schema statistics are not reliable so want to query dba_tables..
Q.
How to spool all table row count of a particular schema and also display table_name?
A.
I can display count easily in spool but not able to get table name beside count..
e.g.
Table_Name Count
tab1 200
tab2 500
tab3 300
with below I can get count but not able to figure out table_name display in result...
spool runme.sql
select 'select count(*) from '|| owner || '.' || table_name || ';'
from dba_tables
where owner = 'user1'
order by table_name;
spool off
thanks
mike