-
Can anybody help me.
I want to get table_names and number of rows in table
for a user.
output should be like this
table_name number_of_rows
-------------- ------------------
Dept 5
Emp 10
...
...
...
...
note : I want to get it by single query
thnx in adv.
P. Soni
-
If the tables are (recently) analyzed:
SELECT table_name, num_rows FROM user_tables;
-
Hi Akkerend
How do i analyze a particular table cause when i run the above query i always get the NUM_ROWS as blank.pls give the syntax.
thanks in advance
pras
-
Here is a Query.
If you want to analyze a particular table use this
Analyze table Table_name compute statistics;
If you want to analyze all the tables just do this
spool analyze.sql
select 'analyze table '||table_name||' compute statistics ;'
from user_tables;
spool off
@analyze.sql
Now You can run this
SELECT table_name, num_rows FROM user_tables;
It will give the table name and number of rows there.
Any Question, feel free.
Thanks
-
Hi Oracledba8
thank you very much.now iam getting the num_rows.
pras
-
Thanks both for your kind help
P. Soni
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|