Which of the following methods returns the number of rows affected by the DML operation?

  • getRowCount()
  • getUpdateCount()
  • getResultCount()
  • getAffectedRowCount()
The correct method to retrieve the number of rows affected by a DML (Data Manipulation Language) operation in JDBC is getUpdateCount(). This method returns an integer representing the number of rows affected by the last executed query or update statement. Options a, c, and d are not standard JDBC methods for retrieving the row count affected by DML operations.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *