Chinaunix首页 | 论坛 | 博客
  • 博客访问: 76187
  • 博文数量: 8
  • 博客积分: 1250
  • 博客等级: 中尉
  • 技术积分: 275
  • 用 户 组: 普通用户
  • 注册时间: 2006-04-20 12:06
文章分类

全部博文(8)

文章存档

2011年(1)

2010年(3)

2009年(4)

我的朋友
最近访客

分类: Oracle

2010-01-20 14:51:41

join table 语句小结
 
select count(*) from test,test1 where test.id = test1.id--交集
select count(*) from test inner join test1 on test.id = test1.id--交集
select count(*) from test cross join test1--笛卡尔积
select count(*) from test left outer join test1 on test.id = test1.id--满足左边
select count(*) from test,test1 where test.id=test1.id(+)--满足左边
select count(*) from test right outer join test1 on test.id = test1.id--满足右边
select count(*) from test,test1 where test.id(+)=test1.id--满足右边
select count(*) from test full outer join test1 on test.id=test1.id--超集
select count(*) from test a join test b on a.id=b.parentid where a.parentid='50'--自表链接
select count(*) from test a,test b where a.id=b.parentid and a.parentid='50'--自表链接
select count(*) from (select id from test union select id from test1)--联合去重排序
select count(*) from (select id from test union all select id from test1)--联合不去重不排序
阅读(472) | 评论(1) | 转发(0) |
0

上一篇:js & html

下一篇:oracle中的split

给主人留下些什么吧!~~

chinaunix网友2010-01-28 14:54:18

oracle中execute immediate的使用(select/insert/update/delete) 转的网上的,execute immediate http://hi.baidu.com/llscompazz/blog/item/29dccd58851fced99c8204d4.html execute immediate的语法如下: execute immediate 'sql'; execute immediate 'sql_select' into var_1, var_2; execute immediate 'sql' using [in|out|in out] bind_var_1, [in|out|in out] bind_var_2; execute immediate 'sql_select' into var_1, var_2 using [in|out|in out] bind_var_1, [in|out|in out] bind_var_2; execute immediate 'sql' returning into