I need to merge to identical tables, but one column (areas_sub_local_obj) has a reference to the Id column (Primary Key). I need a script to insert the data from table 1 into table two and to change the value in the column areas_sub_local_obj to the new Id that corresponds to the original number. Another words: When data is inserted and the original Id was 80 and the new Id is 890 then the rows that contain data in column areas_sub_local_obj that reference to the 80 Id needs to be change to 890 (the new Id) so the parent node relation does not break.
How can I do that?
Thanks!