code: private static void executeSqlScript(Connection connection, URL scriptUrl) throws SQLException {
          for (String sqlStatement : readSqlStatements(scriptUrl)) {
              if (!sqlStatement.trim().isEmpty()) {
                  connection.prepareStatement(sqlStatement).executeUpdate();
              }
          }
      }
docs: Executes SQL script.