数据库跨库连接,插入操作。

  

INSERT INTO [DB_Division].[WinEncash_2017]
SELECT *
FROM OPENROWSET('SQLOLEDB ', '10.44.1.1\\MSSQLSERVER2016'; 'sa '; '123456 ', JS_ConsigneeManageQuery.[DB_Division].[WinEncash_2017]);


SELECT * FROM JS_ConsigneeManageQuery.[DB_Division].[WinEncash_2017]


SELECT * FROM [JS_ConsigneeManage].[DB_Division].[WinEncash_2017]

转载于:https://www.cnblogs.com/lgc0011/p/8145649.html

你可能感兴趣的:(数据库跨库连接,插入操作。)