| Author |
get the last ID in the auto incremented field
|
Peter Primrose
Ranch Hand
Joined: Sep 10, 2004
Posts: 755
|
|
Hi there I have a table with a field, ID, and its incremented every time there is a new data entry. say a user has just completed adding new info - how can i get the ID? thanks Peter
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26216
|
|
Peter, Take a look at this page. It's for db2, but it works the same in most major databases.
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
|
 |
Peter Primrose
Ranch Hand
Joined: Sep 10, 2004
Posts: 755
|
|
it helps! thanks Statement.RETURN_GENERATED_KEYS
|
 |
 |
|
|
subject: get the last ID in the auto incremented field
|
|
|