create table #结果表 (id int)while (select count(*) from #结果表)<=10
insert #结果表 select top 1 * from a where id not in (select id from #结果表 union all select t1id from b where t2id in (select id from #结果表) union all select t2id from b where t1id in (select id from #结果表)) order by newid()
insert #结果表 select top 1 * from a where id not in (select id from #结果表 union all select t1id from b where t2id in (select id from #结果表) union all select t2id from b where t1id in (select id from #结果表)) order by newid()
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货