Sometimes you would like to get the number of records updated by the SQL. It is really very easy. The method executeupdate(…) return an integer value that represents the number of records updated.
int rows = stmt.executeUpdate( "UPDATE customer SET
cust_name = ‘Laiq’ WHERE cust_id = 100" ) ;
System.out.println( rows + " Rows modified" ) ;