title: How can I get the autoincremented id when I insert a record in a table via jdbctemplate
body: <pre><code>private void insertIntoMyTable (Myclass m) {
      String query = "INSERT INTO MYTABLE (NAME) VALUES (?)";
      jdbcTemplate.update(query, m.getName());
  }
  </code></pre>
  
  <p>When the above query inserts a record, the <code>ID</code> column in the table autoincrements. </p>
  
  <p>Is there a way to get this auto incremented ID back at the time of the insertion. So in this example the return value of my method would be <code>int</code></p>