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.

2
  • 3
    No. auto-increment keys means that the incrementation of the key is done automatically by the database. Sometimes (I'm looking at you, Oracle!) you need a sequence + trigger combination to do so, but you never need to look up the previously inserted value for the key, add 1, then use it. Commented Aug 19, 2016 at 14:57
  • With some persistence frameworks such as JPA if you want to return the value of the key ithat was created back to the caller you need to load up the record in order to see the key. Commented May 8, 2017 at 14:03