insert into TABLENAME select *
from OPENROWSET('SQLOLEDB',
'SERVER=10.25.65.32;uid=用户;pwd=密码;Database=库名','select * from 表名') as a
from OPENROWSET('SQLOLEDB',
'SERVER=10.25.65.32;uid=用户;pwd=密码;Database=库名','select * from 表名') as a
此语句可用于本地sql脚本操作外部服务器的结果集使用。