LinkedServer链接服务器的使用
if not exists (select * from master.dbo.sysservers where srvname='srv_kaoqindb')
begin
exec sp_addlinkedserver 'srv_kaoqindb','','SQLOLEDB','168.0.0.1'
exec sp_addlinkedsrvlogin 'srv_kaoqindb','false',null,'sa','sa'
end
insert into employee (sbzno, ygname)
select sbzno, ygname
from srv_kaoqindb.kaoqindb.dbo.V_Tolocal_employee