一:交叉连接-----笛卡尔集(积):
1. select A.name, B.age from A,B
2. select A.name, B.age from A cross join B
二:内连接
1. select A.name, B.age from A,B where A.id = B.id
2. select A.name, B.age from A join B on A.id = B.id
三:(右)外连接
1. select A.name, B.age from A,B where A.id(+) = B.id
2. select A.name, B.age from A right join B on A.id = B.id
四:(左)外连接
1. select A.name, B.age from A,B where A.id = B.id(+)
2. select A.name, B.age from A left join B on A.id = B.id
五:(满)外连接
1. select A.name, B.age from A full outer join B on A.id = B.id
TOP-N查询
select * from ( select * from A order by age desc ) where rownum <= 5 查询前5列
分页查询
select * from (select rownum as myno, A.* from (select * from B order by age desc) A)
where myno >=5 and myno <= 10
1. select A.name, B.age from A,B
2. select A.name, B.age from A cross join B
二:内连接
1. select A.name, B.age from A,B where A.id = B.id
2. select A.name, B.age from A join B on A.id = B.id
三:(右)外连接
1. select A.name, B.age from A,B where A.id(+) = B.id
2. select A.name, B.age from A right join B on A.id = B.id
四:(左)外连接
1. select A.name, B.age from A,B where A.id = B.id(+)
2. select A.name, B.age from A left join B on A.id = B.id
五:(满)外连接
1. select A.name, B.age from A full outer join B on A.id = B.id
TOP-N查询
select * from ( select * from A order by age desc ) where rownum <= 5 查询前5列
分页查询
select * from (select rownum as myno, A.* from (select * from B order by age desc) A)
where myno >=5 and myno <= 10