Working with Result Sets
When a database query is executed, the results of the query are returned as a table of data that is organized according to rows and columns. A ResultSet object that implements the java.sql.ResultSet interface is used to provide access to this tabular data. Query results are returned as ResultSet objects that provide access to the tabular data, one row at a time.
A ResultSet object maintains a pointer to a row within the tabular results. This pointer is referred to as a cursor. When a ResultSet object is returned from a query, the cursor is located before the first row of the table.
The next() method of the ResultSet class is used to move the cursor to the next row of the table. The next() method returns a boolean value ...
Get Sun Certification Training Guide (310-025, 310-027): Java™ 2 Programmer and Developer Exams now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.