jQuery in Action, 2nd edition*
The moose likes JDBC and the fly likes Getting the number of rows from a database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Getting the number of rows from a database" Watch "Getting the number of rows from a database" New topic
Author

Getting the number of rows from a database

Naf Rash
Ranch Hand

Joined: Feb 19, 2004
Posts: 85
I wanted to ask about retrieving the number of rows from ResultSetMetadata(ie, to find out the number of rows a particular database has- the one that is being connected to). I know that getCoulumnCount tells you the number of columns the table has but how would I find out the number of rows because as far as I can see there is no getRowCount method as such? Plaese help!
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Moving this to the JDBC forum...


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Getting the number of rows from a database
 
Similar Threads
How to obtain a database table size?
Selecting n records from a table
I can set the max results on a query, but can I find what the total would have been without (Paging)
Finding out the number of rows a database has.
ResulSet Count