Update

0

Please login or register to vote for this query.

(click on this box to dismiss)

Motor Vehicle Maintenance and Repair Meta

Q&A about the site for mechanics and DIY enthusiast owners of cars, trucks, and motorcycles

create table #A(ID int, value varchar)
create table #B(ID int, value varchar)
insert into #A
values (1,'A'), (2,'A'), (3,'D')
insert into #B
values (1,'C'), (2,'D')

UPDATE #A
SET #A.Value = #B.Value
FROM #B
WHERE #A.ID = #B.ID 

SELECT * FROM #A

Enter Parameters

Options:
Switch to main site
loading Hold tight while we fetch your results