update a set a.id=(selelct b.id from temp b where b.line = a.line) where a.line = (select line from temp b where b.line = a.line)