Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: number of rows query.
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