Use a table Update to another table according to conditions
Update table1 set id = t2.id from table1 T1, table t2 where t1.name = t2.name
Create a new table according to existing content
Select ID, Name Into nextTable from Oldtable where ...........