I need to insert two tables into my database, one of the tables has a primary key and the other one will use that value as a foreign key.
My question is: How can I return the value of this primary key at the time of insertion? Or how can I do the PK search, without the risk of getting the value of another tuple that was inserted at the same time or soon after?
Thank you