update s1 
set foodId=s1.id
from room s1,room s2
where s1.id=s2.id;

《===》

update room set roomId=id