Thursday, May 6, 2010

Update record in a Database on the basis of Other Database

Some times we need to sync our tables with other tables which may have some other database .
so we can use update feature like that
update person
set name = B.personname,
age=B.age

from DB1.dbo.person as A, DB2.dbo.person2 as B
WHERE A.id = B.personid

No comments:

Post a Comment