code: public static PreparedStatement createWayNodeTable(Connection connection, String wayNodeTableName) throws SQLException{
          try (Statement stmt = connection.createStatement()) {
              StringBuilder sb = new StringBuilder("CREATE TABLE ");
              sb.append(wayNodeTableName);
              sb.append("(ID_WAY BIGINT, ID_NODE BIGINT, NODE_ORDER INT);");
              stmt.execute(sb.toString());
          }
          return connection.prepareStatement("INSERT INTO " + wayNodeTableName + " VALUES ( ?, ?,?);");
      }
docs: Create a table to store the list of nodes for each way.
  
  @param connection
  @param wayNodeTableName
  @return
  @throws SQLException