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: <mgogala_at_rocketmail.com>
Date: Sat, 02 Jan 1999 01:31:11 GMT
Message-ID: <76jst0$ln9$1@nnrp1.dejanews.com>


In article <368a8bd8.10556391_at_news.siol.net>,   jmodic_at_src.si (Jurij Modic) wrote:
> 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
>

Alternatively, you could analyze the table and select the corresponding column from user_tables.

--
Mladen Gogala

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Fri Jan 01 1999 - 19:31:11 CST

Original text of this message

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