Perform INSERT with SELECT to insert multiple records

后端 未结 7 1396
情深已故
情深已故 2021-02-05 08:13

In the diagram below there is a 1:1 relationship between \'DodgyOldTable\' and \'MainTable\'. Table \'Option\' contains records with \'OptionVal1\', \'OptionVal2\' and \'OptionV

7条回答
  •  萌比男神i
    2021-02-05 08:22

    My experience is it is often more easy and more readable to divide it up into smaller bits. So don't try to do everything in one single query. Especially when you are making migration scripts this should not be an issue.

    Write down the steps, maybe introduce a temporary table, write the scripts to migrate your data and you are good to go!

提交回复
热议问题