What are different types of ResultSet in JDBC?ResultSet contains results of the SQL query. There are 3 basic types of ResultSet.
As name suggest, this type can only move forward and are non-scrollable.
This type is scrollable which means the cursor can move in any direction. It is insensitive which means any change to the database will not show change in the ResultSet while it open.
This type allows cursor to move in any direction and also propagates the changes done to the database.
Explain the different types of ResultSet in JDBC. The result of a SQL query is available in ResultSet object. ResultSets are of 3 types.
This type of ResultSet can make the traversal for rows only in the forward direction and non-scrollable.
Scroll-insensitive ResultSet are not capable for scrolling. That means the cursor can move in only one direction. When the ResultSet is open, any change to the database table will not reflect.
Unlike Scroll-insensitive, the Scroll-sensitive ResultSet is capable to move the cursor in bidirectional. It also enables the changes done to the database tables when open.