Problem
sale
id (int)
udid (int)
assid (int)
ud
id (int)
assid (int)
sale.assid contains the correct value to update ud.assid.
What MS SQL query will do this? Could you do that without JOIN
?
update u
set u.assid = s.assid
from ud u
inner join sale s on
u.id = s.udid
Without JOIN
:
update ud
set assid = sale.assid
from sale
where sale.udid = id