Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Getting Record Count from SELECTs
On Tue, 11 Oct 2005 08:45:41 -0700, GeoPappas interested us by writing:
> Is there any way to get the record count from a SELECT statement
> without having to run another query?
>
> For example, say you have a query as follows:
>
> SELECT * FROM temp WHERE create_date < TO_DATE( '01/01/2005',
> 'MM/DD/RRRR' );
>
> Is there any way to get the record count without having to run anothe
> SELECT, such as:
>
> SELECT COUNT(*) FROM temp WHERE create_date < TO_DATE( '01/01/2005',
> 'MM/DD/RRRR' );
When, exactly, do you want the count value? Do you need it before the
'select *' (for example, to control a loop), during, or at the end (to
indicate how many have been received)?
Which environment are you using? (Pro*C, SQL*Plus, VB/.Net)
-- Hans Forbrich Canada-wide Oracle training and consulting mailto: Fuzzy.GreyBeard_at_gmail.com *** I no longer assist with top-posted newsgroup queries ***Received on Tue Oct 11 2005 - 11:13:59 CDT
![]() |
![]() |