I am trying to migrate data from an old table into two different tables. I am curious if there is a way to do something like the following.
INSERT INTO table1(v1, v2)
INSERT INTO table2(LAST_INSERT_ID(), v3)
SELECT v1, v2, v3 FROM old_table
Do I have to write a procedure for this?