I have SQL-SERVER 2012 with two DB. I need to update the table test1 in DB1 from table test2 in DB2 if one of the columns changed.
How can i do that?
Thanks,
Tal
I have SQL-SERVER 2012 with two DB. I need to update the table test1 in DB1 from table test2 in DB2 if one of the columns changed.
How can i do that?
Thanks,
Tal
here is a syntax-
UPDATE [database1]..[table1]
SET tb1.[column1]= tb2.[column1],
tb1.[column2] = tb2.[column2],
.
.
.
.
tb1.[column_n] = tb2.[column_n],
FROM [database1]..[table1] as tb1 JOIN [database2]..[table2] as tb2
ON tb1..[common_column] = tb2..[common_column]