其中id1和id2作为唯一标识。
select * from dbo.test1 as a,dbo.test2 as b where a.Id1=b.Id1 and a.Id2=b.Id2
select * from dbo.test1 as a inner join dbo.test2 as b on a.Id1=b.Id1 and a.Id2=b.Id2
如果以下这样作为更新使用,是否存在什么问题?
update test1
set [字段1]=b.[字段1],[字段2]=b.[字段2]
from test1 as a,test2 as b
where a.Id1=b.Id1 and a.Id2=b.Id2