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

Home -> Community -> Usenet -> c.d.o.server -> Re: Any way to get RowCount by not using Select count(*) from table

Re: Any way to get RowCount by not using Select count(*) from table

From: Jurij Modic <jmodic_at_src.si>
Date: Wed, 30 Dec 1998 22:18:55 GMT
Message-ID: <368a8bd8.10556391@news.siol.net>


On Tue, 29 Dec 1998 14:29:57 -0800, Jonathan Ingram <jonathan.ingram_at_miname.com> wrote:

>boonsong wrote:
>
>> Any way to get RowCound by not using Select count(*) from table
>
>Yes. Don't select count (*); instead, do one of the following:
>
> select count (1) from <table>;
> select count (rowid) from <table>;

Which, in any case, will return exactly the same result as "select count(*)"

>Jonathan

Regards,
Jurij Modic <jmodic_at_src.si>
Certified Oracle7 DBA (OCP)



The above opinions are mine and do not represent any official standpoints of my employer Received on Wed Dec 30 1998 - 16:18:55 CST

Original text of this message

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