When I insert into table A a foreign key is referenced.

The problem is that I need to insert into 2 tables at the same time, ie the original table and the table where the key is referenced.

I've thought about joining the tables and then using insert but i can't find any documentation on how to do this.