Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

1
  • I know how to retrieve generated key if driver supports this feature and I wrote it in my question. My question is: How to retrieve genrated key if driver (or database, I am not sure which is reponsible for this feature) does not support prepareStatement(sql, Statement.RETURN_GENERATED_KEYS). As i wrote in my question this code throws exception in my case. Maybe if JDBC drivers are backward compatible (in another words I can connect to old database using new driver) and all DBMS can return generated key, I only have to use JDBC 4 driver. But I don't know it. Commented Dec 9, 2014 at 14:21