34,590
社区成员
发帖
与我相关
我的任务
分享
;with tt1 as
(
select rid=row_number() over (order by getdate()),a,b
from t1
),tt2 as
(
select rid=row_number() over (order by getdate()),c,d
from t2
)
insert into t3
select max(a),max(b),max(c),max(d)
from tt1 join tt2 on tt1.rid = tt2.rid
group by tt1.rid