跨服务器 快速 导入数据表记录 Insert into SELECT
生活随笔
收集整理的這篇文章主要介紹了
跨服务器 快速 导入数据表记录 Insert into SELECT
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
Use DataBaseName/*開啟Ad Hoc Distributed Queries組件exec sp_configure 'show advanced options',1
reconfigure
exec sp_configure 'Ad Hoc Distributed Queries',1
reconfigure*/Insert into tableName (col1,col2,col3,……) --字段不能含有主鍵SELECT col1,col2,col3,……from opendatasource
('SQLOLEDB','Data Source=192.168.0.1;User ID=dbuser;Password=123456'
).DataBaseName.dbo.tableName
WHERE [datetime]>'2016-11-01 15:00:18.663'
AND [datetime]<'2016-11-01 15:00:18.663'/*關閉Ad Hoc Distributed Queries組件exec sp_configure 'Ad Hoc Distributed Queries',0
reconfigure
exec sp_configure 'show advanced options',0
reconfigure
*/
?
總結
以上是生活随笔為你收集整理的跨服务器 快速 导入数据表记录 Insert into SELECT的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 遍历文件夹还原数据库SQL语句
- 下一篇: “*** IS NOT TRANSLAT