Update

0

Please login or register to vote for this query.

(click on this box to dismiss)

Data Science

Q&A for Data science professionals, Machine Learning specialists, and those interested in learning more about the field

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 AND #A.Value <> #B.Value

SELECT * FROM #A

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results