Just a quick question. If there is referential integrity here (which there ought to be as you have implied the use of a key between the two tables) then in which direction does this integrity run?
it is table1 has (many) table2
or table2 has (many) table1
From what I can see you are updating table2 based on the fact that it contains the same ID as an ID that exists in table1. However (and i'm only guessing here) when will table2 NOT have the an ID that exists in table1 if they share the same key???