如果 T1 和 T2 已设置(无重复行),则为“是”,否则答案为“否”。
create table t1 (i int);
create table t2 (i int);
insert into t1 values (1);
insert into t1 values (2);
insert into t1 values (2);
insert into t2 values (3);
Run Code Online (Sandbox Code Playgroud)
select * from t1 full join t2 on t1.i=t2.i
order by 1,2
Run Code Online (Sandbox Code Playgroud)
1 (null)
2 2
2 2
(null) 3
Run Code Online (Sandbox Code Playgroud)
select * from t1 left join t2 on t1.i=t2.i
union
select * from t1 right join t2 on t1.i=t2.i
order by 1,2
Run Code Online (Sandbox Code Playgroud)
1 (null)
2 2
(null) 3
Run Code Online (Sandbox Code Playgroud)
select * from t1 left join t2 on t1.i=t2.i
union all
select * from t1 right join t2 on t1.i=t2.i
order by 1,2
Run Code Online (Sandbox Code Playgroud)
1 (null)
2 2
2 2
2 2
2 2
(null) 3
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2264 次 |
| 最近记录: |