DBA > Job Interview Questions > DERBY Java Database FAQs

What is ResultSets and Cursors ?

More DBA job interview questions and answers at http://dba.fyicenter.com/Interview-Questions/

(Continued from previous question...)

What is ResultSets and Cursors ?

Executing a Statement that returns values gives a ResultSet (java.sql.ResultSet), allowing the application to obtain the results of the statement. Only one ResultSet can be open for a particular Statement at any time, as per the JDBC specification.

Thus, executing a Statement automatically closes any open ResultSet generated by an earlier execution of that Statement.

For this reason, you must use a different Statement to update a cursor (a named ResultSet) from the one used to generate the cursor.

The names of open cursors must be unique within a Connection. For more information about how to use cursors and ResultSets

(Continued on next question...)

Other Job Interview Questions