title: Are the parameter values automatically cleared after executing a batch of SQL commands with a Java PreparedStatemen?
body: <p>I have the following code snippet:</p>
  
  <pre><code>PreparedStatement preparedStatement = connection.prepareStatement(sql);
  for (int i = 0; i &lt; 100000; i++) {
      preparedStatement.setObject(1, someValue);
      preparedStatement.addBatch();
      if ((i + 1) % 100 == 0) {
          preparedStatement.executeBatch();
      }
  }
  </code></pre>
  
  <p>so I want to execute one command around 100 000 times with different values. My question is: are the parameters from the PreparedStatement cleared after each call to executeBatch() or do I have to explicitly call preparedStatement.clearParameters() after calling executeBatch() in order to make sure that there will be executed only the last 100 commands?</p>