开发者

Update field with data from another database [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.

Want to improve this question? Add details and clarify the problem by editing this post.

Closed 8 years ago.

Improve this question

Need to update a field with data from another field in a different database

I Have two SQL commercial Databases from the same company, the first Database has one field that is null in the o开发者_Go百科ther

I need to update the Field/Database that is null with the data of the first one.


MS SQL Server

Update table1 in current database from table1 in database called "DataBaseName"

update table1
set col2 = T2.col2
from DataBaseName.dbo.table1 as T2
  where table1.ID = T2.ID and
        table1.col2 is null
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜