| Author |
Fetching auto-generated primary key value after insert
|
Chetan Parekh
Ranch Hand
Joined: Sep 16, 2004
Posts: 3636
|
|
We are using JDBCTemplate for JDBC connectivity. Following is our insert query
insert into MyTable (Column2,Column4,Column4) values (?,?,?)
MyTable has primary key Column1 and it is a auto-generated. We need to fetch the value of Column1 after we insert record using above query.
How to achieve this?
|
My blood is tested +ve for Java.
|
 |
Chetan Parekh
Ranch Hand
Joined: Sep 16, 2004
Posts: 3636
|
|
I found the solution here
|
 |
 |
|
|
subject: Fetching auto-generated primary key value after insert
|
|
|