1.

What is ResultSet?

Answer»
  • The java.SQL.ResultSet interface represents the database result set, which is obtained after the execution of SQL query using Statement objects.
  • Object of ResultSet maintains a cursor pointing to the current ROW of data in the result set. Initially, the cursor is located before the first row. Then the cursor is MOVED to the next row by using the next() method. The next() method can be used to iterate through the result set with the HELP of a while loop. If there are no further ROWS, the next() method will return false.
  • Example for the creation of ResultSet is given below:
    ResultSet rs = con.executeQuery(sqlQuery);


Discussion

No Comment Found