Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Count rows in a table being retrieved from dba_segments

524501Jul 25 2006 — edited Jul 26 2006
Hello guys,
I was wondering how can I count the rows in a table that is being retrieved from dba_segments.

-- I am getting the table name from dba_segment
-- Is it possible to count the number of rows in that table at the same time?
-- If not, is there an alternative step without analyzing the table or schema, then getting the result from num_rows in all_tables?

I want the count code to add to the select statement..
SELECT owner, segment_name , segment_type, partition_name, bytes
FROM   dba_segments
WHERE  owner = UPPER( v_schema )
ORDER BY segment_name;
I try to add this to the select statement. count(segment_name), but that did not work.

Any direction(s)?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 23 2006
Added on Jul 25 2006
6 comments
1,115 views