Update

0

Please login or register to vote for this query.

(click on this box to dismiss)

Software Quality Assurance and Testing Meta

Q&A about the site for software quality control experts, automation engineers, and software testers

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 to main site
loading Hold tight while we fetch your results