Pinned topic Fetching the value of auto increment primary key after insert
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
We are trying to insert into 2 tables. The first table has an auto increment
primary key. The second table has a foreign key reference to the first table.
How can we get the primary key value of the first table so we
can insert that value into the second table?
In JDBC we can use Statement.getGeneratedKeys() :
How can we do this in Castiron orchestration?
Any help would be appreciated.
Updated on 2010-01-29T00:18:24Z at 2010-01-29T00:18:24Z by SystemAdmin
SystemAdmin 110000D4XK238 Posts
Re:Fetching the value of auto increment primary key after insert2010-01-29T00:18:24ZThis is the accepted answer. This is the accepted answer.Thanks for your question. Currently this is not supported automatically in the product, and something we will look to add in the future. A possible workaround is to select the primary key value from the first table based on some other user-defined key and insert into the second table.