question: public void testUpdate8 ( ) throws SQLException { statement . executeUpdate ( "UPDATE " + DatabaseCreator . SIMPLE_TABLE3 + " SET speed = (SELECT MAX(speed) FROM " + DatabaseCreator . SIMPLE_TABLE1 + ") WHERE id = (SELECT id FROM " + DatabaseCreator . SIMPLE_TABLE1 + " WHERE speed = (SELECT MAX(speed) FROM " + DatabaseCreator . SIMPLE_TABLE1 + "))" ) ; ResultSet r = statement . executeQuery ( "SELECT id FROM " + DatabaseCreator . SIMPLE_TABLE3 + " WHERE speed = (SELECT MAX(speed) FROM " + DatabaseCreator . SIMPLE_TABLE1 + ");" ) ; r . next ( ) ; assertEquals ( "Incorrect id updated" , 1 , r . getInt ( 1 ) ) ; r . close ( ) ; }
target:  UpdateFunctionalityTest2#testUpdate8(). Updates table using scalar subquery as new field value