oracle 左右连接 外连接

1左连接 slect a.a,b.b from table a left join table b  on a.c=b.d where a.m='123'
  显示左边(table a left )全部的和右边与左边相同的
  符号表示:b.d(+) = a.c

2右连接 slect a.a,b.b from table b right join table b  on a.c=b.d where a.m='123'
  显示右边(table b right )全部的和左边与右边相同的
               b.d = a.c(+)

3 内连接  普通的连接 slect a.a , b.b from table a , table b where a.a = b. b

4 全外连接 两个表全部显示 slect a.a , b.b from table a ,outer join table b on a.a = b.b 
  显示把所有的左连接 和 右连接的并集
  (+)不能用于实现完全外连接

posted on 2012-04-25 15:49 youngturk 阅读(922) 评论(2)  编辑  收藏 所属分类: Oracle

评论

# re: oracle 左右连接 外连接 2012-04-25 16:48 foo

关于join
以此文为止
http://www.dbabeta.com/2011/visual-sql-joins.html  回复  更多评论   

# re: oracle 左右连接 外连接 2012-04-25 16:49 foo

不要用加号,多表join时 可读性差   回复  更多评论   


只有注册用户登录后才能发表评论。


网站导航:
 
<2012年4月>
25262728293031
1234567
891011121314
15161718192021
22232425262728
293012345

导航

统计

公告

this year :
1 jQuery
2 freemarker
3 框架结构
4 口语英语

常用链接

留言簿(6)

随笔分类

随笔档案

文章分类

文章档案

相册

EJB学习

Flex学习

learn English

oracle

spring MVC web service

SQL

Struts

生活保健

解析文件

搜索

最新评论

阅读排行榜

评论排行榜