title: Unable to find a generated key in Java using PreparedStatement's getGeneratedKeys()
body: <p>I have a query as follows:</p>
  
  <pre><code>String SQL = "insert into table (id, name) values (sequence.nextval, ?)";
  </code></pre>
  
  <p>I then make a PreparedStatement like this:</p>
  
  <pre><code>//initiate connection, statement etc
  pStatement = connection.prepareStatement(SQL, Statement.RETURN_GENERATED_KEYS);
  pStatement.setString(1,'blabla');
  
  pStatement.executeUpdate();
  ResultSet rs = pStatement.getGeneratedKeys();
  
  while (rs.next()){
    //debugging here to see what rs has
  }
  </code></pre>
  
  <p>When executing and debugging at that debug point, I see my ResultSet only has one key, a string - not like the id I expect at all. When checking the database everything works fine, the id's get inserted and everything. There's something about the <strong>getGeneratedKeys();</strong>
  that's confusing me.</p>
  
  <p>What am I doing wrong?</p>
  
  <p>Thanks in advance</p>