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);
commit;
select * from test1
select * from test2
--内连接
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 a, test2 b
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/21634752/viewspace-667774/ ,如需转载,请注明出处,否则将追究法律责任。