34,593
社区成员
发帖
与我相关
我的任务
分享
DECLARE @t1 table (f1 int, f2 int)
declare @t2 table (c1 char, c2 char)
insert into @t1 values (1,2)
insert into @t1 values (3,4)
insert into @t2 values ('a','b')
insert into @t2 values ('c','d')
select * from @t1 left join @t2 on 1=2
union all
select * from @t1 right join @t2 on 1=2
??
select isnull(a,'') a,
isnull(b,'') b,
isnull(c,'') c,
isnull(d,'') d,
from t1 full join t2
on t1.a=t2.c
select * from T1
union all
select * from T2