日期:2014-05-17 浏览次数:20459 次
insert into B1
SELECT 4,5,3,select top 1 b from OPENDATASOURCE('sqloledb','data source=192.168.0.2;user id=sa;password=123').数据库A..A1
insert into B1(a,b,c,d)
select 4,5,3,
(
SELECT top 1 b
FROM OPENROWSET('SQLOLEDB',
'server=192.168.0.2;uid=sa;pwd=123', --字符串
A.dbo.A1) --直接写你的数据库和表的名称
) as d