Answer the question
In order to leave comments, you need to log in
How is insert into linked tables implemented?
How to implement insert into related tables?
Peoples (Id, Name)
Places (Id, Place)
Location (People_id, Place_id)
Add a new person and a new place at the same time. Now I'm solving this head-on, adding a person and a place, pulling out the last IDs from these tables and doing an insert into the location table. Accordingly, there is no multithreading.
How else can this problem be solved?
Answer the question
In order to leave comments, you need to log in
One of the possible options for you is to create a view (VIEW) and assign a trigger to this view on INSERT. In the body of the trigger, post all the records you need to the tables you need.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question