Update Query with INNER JOIN between tables in 2 different databases on 1 server

后端 未结 11 1321
梦如初夏
梦如初夏 2020-12-08 09:29

Need some SQL syntax help :-)

Both databases are on the same server

db1 = DHE
db2 = DHE_Import

UPDATE DHE.dbo.tblAccounts 
INNER JOIN DHE_Import.dbo         


        
11条回答
  •  感动是毒
    2020-12-08 09:40

    It is explained here http://erabhinavrana.blogspot.in/2014/01/how-to-execute-update-query-by-applying.html

    It also has other useful code snippets which are commonly used.

    update . A INNER JOIN .
    RA ON A.=RA. SET A.=RA.

    Replace data in <> with your appropriate values.

    That's It. source:

    http://www.dynamic-coders.com/how-to-update-two-different-tables-in-different-databases-on-same-server

    提交回复
    热议问题