Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> count for a newbie

count for a newbie

From: Bryant Baecht <b_b_a_e_c_h_t_at_sun_flower.com>
Date: Mon, 18 Sep 2000 16:01:07 GMT
Message-ID: <sscevccjh3t113@corp.supernews.com>

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US