oracle中join的用法Oracle认证考试
文章作者 100test 发表时间 2010:04:01 17:45:32
来源 100Test.Com百考试题网
8i:
create table dali.test1(a int,b int).
create table dali.test2(a int,b int).
insert into dali.test1 values(1,456).
insert into dali.test1 values(2,427).
insert into dali.test2 values(1,45456).
insert into dali.test2 values(3,45656).
---内连接
0select * from dali.test1 a, dali.test2 b where a.a=b.a.
---左连接
0select * from dali.test1 a, dali.test2 b where a.a=b.a( ).
---右连接
0select * from dali.test1 a, dali.test2 b where a.a( )=b.a.
---完全连接
0select * from dali.test1 a, dali.test2 b where a.a=b.a( )
union
0select * from dali.test1 a, dali.test2 b where a.a( )=b.a.
---迪卡尔
0select * from dali.test1, dali.test2.
==================================================================
9i和sqlserver一样 left join,right join,full join
分为1. INNER JOIN 2. LEFT JOIN 3. RIGHT JOIN 4.LEFT OUTER JOIN