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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Select count(*)

Re: Select count(*)

From: Matthias Gresz <GreMa_at_t-online.de>
Date: 1997/11/26
Message-ID: <65gi12$6m6$1@news01.btx.dtag.de>#1/1

Johnny Taxén wrote:
>
> Hello
>
> I´m trying to do, probably a very simple SELECT command. But i just
> can´t
> get it to work. I want to do a SELECT COUNT(*) that displays only the
> tables that have any rows.
>
> Regards/Johnny T

Hi,

ever tried

select

        a.table_name, a.number_rows
from

	(select 
		count(*) number_rows, table_name
	 from
		user_tables
	 group by
		table_name
	) a
where 
	a.number_rows > 0

; ?
-- 
Regards

Matthias Gresz    :-)
Received on Wed Nov 26 1997 - 00:00:00 CST

Original text of this message

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