stat.executeUpdate( "UPDATE Account SET Balance = Balance -" + amount + " WHERE Account_Number = " +fromAccount); stat.executeUpdate( "UPDATE Account SET Balance = Balance +" + amount + " WHERE Account_Number = " +toAccount); COMMIT
try { . . . } catch(SQLException exception) { stat.rollback(); }