Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Get the record count from a query

843854Feb 4 2004 — edited Feb 5 2004
Hi,
does anyone know how to get the record count from a sql query?
e.g: I've got a ResultSet from the Statement.excuteQuery(), and I want to know how many records this ResultSet contains, how to get this?
I'd read thoughout the documents of Statement and ResultSet, but couldn't find a solution, do I have to use another seperate query such as "select count(*)" to do this?

thanks.

Yang Liu
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 4 2004
Added on Feb 4 2004
5 comments
803 views