Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: To know the number of results returned just after query ??
Isma wrote:
> Hi,
>
> I use a JDBC driver. I want to know whether exists a command to know the
> results number just after the query.(i.e. lines)
>
> [I know it exists getColumnCount() to know the number of columns return
> ..
> int numcols = rsmd.getColumnCount();
No such thing exists, you must either: loop through the resultset and count
yourself (pretty easy). Issue a query. something like "select count(*) from
XXX where <same condition ...."
Or if you use a scrollable resultset, du ResultSet.last(), to jump to the
last record, and get its rownumnber, the jump to the first record again,
and proceed as usual
-- Nils O. SelÄsdalReceived on Thu Aug 02 2001 - 13:07:50 CDT
![]() |
![]() |