两个数据库表的连接 查询

use fs2008
if not exists (select * from master.dbo.sysservers where srvname='192.168.31.5')
EXEC sp_addlinkedserver '192.168.31.5',N'SQL Server'
EXEC sp_addlinkedsrvlogin '192.168.31.5','false',NULL,'sa,'password'

insert into() selct [111.111.11.11].[dbname].[dbo].[tablename]

insert into gg1
select from  [111.111.11.11].[dbname].[dbo].[tablename]

原文地址:https://www.cnblogs.com/winner/p/1087082.html