public void testInsert3() throws SQLException {
  DatabaseCreator.fillParentTable(conn);
  DatabaseCreator.fillFKStrictTable(conn);
  statement.execute("INSERT INTO " + DatabaseCreator.TEST_TABLE5 + " SELECT id AS testId, value AS testValue "+ "FROM "+ DatabaseCreator.FKSTRICT_TABLE+ " WHERE name_id = 1");
  ResultSet r=statement.executeQuery("SELECT COUNT(*) FROM " + DatabaseCreator.TEST_TABLE5);
  r.next();
  assertEquals("Should be 2 rows",2,r.getInt(1));
  r.close();
}

public void testInsert3 ( ) throws SQLException { DatabaseCreator . fillParentTable ( conn ) ; DatabaseCreator . fillFKStrictTable ( conn ) ; statement . execute ( "INSERT INTO " + DatabaseCreator . TEST_TABLE5 + " SELECT id AS testId, value AS testValue " + "FROM " + DatabaseCreator . FKSTRICT_TABLE + " WHERE name_id = 1" ) ; ResultSet r = statement . executeQuery ( "SELECT COUNT(*) FROM " + DatabaseCreator . TEST_TABLE5 ) ; r . next ( ) ; assertEquals ( "Should be 2 rows" , 2 , r . getInt ( 1 ) ) ; r . close ( ) ; }
insertfunctionalitytest # testinsert3 ( ) . tests insert . . . select functionality
