Friday, 10 January 2020

AJ-Chapter 1




What is ResultSet?

 A ResultSet object maintains a cursor that points to the current row in the result set.

Commonly used Methods of ResultSet Interface in Java

      public boolean first():-Used to move the cursor to the first row in result set object.

      public boolean last():-Used to move the cursor to the last row in result set object.

      public boolean absolute(int row):-Used to move the cursor to the specified row number in the ResultSet object.

      public boolean relative(int row):-Used to move the cursor to the relative row number in the ResultSet object, it may be positive or negative.

      public int getInt(int columnIndex):-Used to return the data of specified column index of the current row as int.

      public int getInt(String columnName):-Used to return the data of specified column name of the current row as int.

      public String getString(int columnIndex):-Used to return the data of specified column index of the current row as String.

      public String getString(String columnName):-Used to return the data of specified column name of the current row as String.

      public boolean next():-Used to move the cursor to the one row next from the current position.

public boolean previous():-Used to move the cursor to the one row previous from the current position.