Oacle 외부 연결

Oacle 외부 연결 "(+)" 의 용법:
Connected to Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 
Connected as scott

SQL> select deptno from dept;
 
DEPTNO
------
    10
    20
    30
    40
    50
 
SQL> select ename from emp;
 
ENAME
----------
SMITH
ALLEN
WARD
JONES
MARTIN
BLAKE
CLARK
SCOTT
KING
TURNER
ADAMS
JAMES
FORD
MILLER
 
14 rows selected
 
SQL> select d.deptno,e.ename from dept d,emp e where e.deptno(+)=d.deptno;
 
DEPTNO ENAME
------ ----------
    20 SMITH
    30 ALLEN
    30 WARD
    20 JONES
    30 MARTIN
    30 BLAKE
    10 CLARK
    20 SCOTT
    10 KING
    30 TURNER
    20 ADAMS
    30 JAMES
    20 FORD
    10 MILLER
    50 
    40 
 
16 rows selected
 
SQL> select d.deptno,e.ename from dept d,emp e where e.deptno=d.deptno(+);
 
DEPTNO ENAME
------ ----------
    20 SMITH
    30 ALLEN
    30 WARD
    20 JONES
    30 MARTIN
    30 BLAKE
    10 CLARK
    20 SCOTT
    10 KING
    30 TURNER
    20 ADAMS
    30 JAMES
    20 FORD
    10 MILLER
 
14 rows selected

 그 결과 '(+)' 가 어느 표 옆 에 나타 나 면 그 표 는 보충 표 이다.

좋은 웹페이지 즐겨찾기