两个数据库表的连接 查询

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]

posted @ 2008-03-01 12:08  Winner.Net(2007)  阅读(971)  评论(0编辑  收藏  举报