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: number of rows query.

Re: number of rows query.

From: Jerome Vitalis <vitalismanREMOVETHAT_at_gmail.com>
Date: Fri, 28 Jul 2006 13:11:42 +0200
Message-ID: <44c9f10d$0$8622$636a55ce@news.free.fr>


Ale wrote:
> hi there,
> I'm a beginners and so please let me post this orrible stupid
> question:
> I have to do a quary that return the count (integer) of a row returned
> from a query like
> select * from db where ... is it possible?
> And how to do this?
> cheers
> --Alessio
>

Just use the count function:

select count(*) from db;
or
select count(column_name) from db;
or
select count(1) from db;
or ...etc...

(With recent versions of Oracle, it does not matter which one you choose ; with older versions, the performance of each of those queries might have varied.) Received on Fri Jul 28 2006 - 06:11:42 CDT

Original text of this message

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