Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> count for a newbie
Hi all,
I want to select all segments from sys.dba_segments by a userid and do a count on each table. My SQL looks something like this but it doesn't work.
select segment_name,count(*) from sys.dba_segments where user='tom' group by segment_name;
What I want my output to look like is this:
SEGMENT_NAME COUNT(*)
doctaba 349 user_table1 102434 user_table2 3096
..
Any quick pointers are definitely appreciated.
TIA, Bryant Received on Mon Sep 18 2000 - 11:01:07 CDT
![]() |
![]() |