create table test1(a int,b int);
create table test2(a int,b int);
insert into test1 values(1,456);
insert into test1 values(2,427);
insert into test2 values(1,45456);
insert into test2 values(3,45656);
---内连接
select * from test1 a, test2 b where a.a=b.a;
---左连接
select * from test1 a, test2 b where a.a=b.a(+);
---右连接
select * from test1 a, test2 b where a.a(+)=b.a;
---完全连接
select * from test1 a, test2 b where a.a=b.a(+)
union
select * from test1 a, test2 b where a.a(+)=b.a;
---迪卡尔
select * from test1, test2;
create table test2(a int,b int);
insert into test1 values(1,456);
insert into test1 values(2,427);
insert into test2 values(1,45456);
insert into test2 values(3,45656);
---内连接
select * from test1 a, test2 b where a.a=b.a;
---左连接
select * from test1 a, test2 b where a.a=b.a(+);
---右连接
select * from test1 a, test2 b where a.a(+)=b.a;
---完全连接
select * from test1 a, test2 b where a.a=b.a(+)
union
select * from test1 a, test2 b where a.a(+)=b.a;
---迪卡尔
select * from test1, test2;