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

Home -> Community -> Usenet -> c.d.o.tools -> How to get count after select column from table?

How to get count after select column from table?

From: <yong321_at_yahoo.com>
Date: 2000/06/20
Message-ID: <8iorf2$vvp$1@nnrp1.deja.com>#1/1

I know in Oracle SQL*PLus, if your query returns a certain number of rows or more, it reports "XXX number of rows selected" (if feedback is on). I want to get this count in an environment other than SQL*Plus, for example, Perl DBI. That is, after I process each row from the query "select * from mytable where...":

while (($mycolumn)=$sth->fetchrow_array)  { #do something to this row }

I want to say:

print "You got $someDBIfunction() number of rows";

without issuing another query "select count(*) from mytable where...".

Perl is just an example. Java, VB, etc. is fine. Thanks.

--
Yong Huang

(yong321_at_yahoo.com)


Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Tue Jun 20 2000 - 00:00:00 CDT

Original text of this message

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