34,588
社区成员
发帖
与我相关
我的任务
分享
--如果相等
select a.* from servername1.dbname1.dboname1.a , servername2.dbname2.dboname2.b where a.newid = b.startid
--我明白了,是查没有的?
select top 10 a.* from servername1.dbname1.dboname1.a where newid not in select startid from servername2.dbname2.dboname2.b
select top 10 * from A裤.dbo.A x where not exists(select 1 from B裤.dbo.B y where newid=x.starid)