Oracle表连接方式
原文 : http://database.51cto.com/art/201009/228094.htm
1. 内连接(自然连接)
2. 外连接
(1)左外连接 (左边的表不加限制)
(2)右外连接(右边的表不加限制)
(3)全外连接(左右两表都不加限制)
3. 自连接(同一张表内的连接)
SQL的标准语法:
SQL> select work.ename worker,mgr.ename manager from scott.emp work, scott.emp mgr 2 where work.mgr = mgr.empno(+) 3 order by work.ename; WORKER MANAGER ---------- ---------- ADAMS SCOTT ALLEN BLAKE BLAKE KING CLARK KING FORD JONES JAMES BLAKE JONES KING KING --此处右表不足用Null 填充 MARTIN BLAKE MILLER CLARK SCOTT JONES SMITH FORD TURNER BLAKE WARD BLAKE