title: Insert the data from Old table to new table, ID from new table and update for the corresponding row in old table. Most optimized way?
body: <p>I have two table. OLDTABLE and NEWTABLE.
  I need to insert some data from oldtable to newtable and the get the ID from new table and update in the oldtable for that corresponding row. the newtable ID has seperate column in oldtable which is null by default.</p>
  
  <p>One way is to get the ID from both table while inserting the data in new table and then later find the data in oldtable and update it. Which is simpler way. </p>
  
  <p>Can anyone suggest some optimized way to do so?</p>