ITPub博客

首页 > Linux操作系统 > Linux操作系统 > oracle 连接

oracle 连接

原创 Linux操作系统 作者:wuft2003 时间:2010-07-12 11:16:38 0 删除 编辑

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/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: at 命令学习
请登录后发表评论 登录
全部评论

注册时间:2009-05-12

  • 博文量
    295
  • 访问量
    383685