O'Reilly logo

Sun Certification Training Guide (310-025, 310-027): Java™ 2 Programmer and Developer Exams by Jamie Jaworski

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required