티스토리 뷰

Database

[ORACLE]OUT JOIN

애플자라 2013. 6. 14. 17:41
반응형

SELECT A.POST_ID I_POST_ID,
       A.NAME AS I_NAME,
       A.PHONE1 I_R_PHONE1,
       A.PHONE2 I_R_PHONE2,
       A.PHONE3 I_R_PHONE3,
       NVL (B.GUBUN, '신규') AS GUBUN1,
       A.REGISTER_DT I_REGISTER_DT,
       A.GUBUN GUBUN,
       A.EVENT_YN,
       ROW_NUMBER () OVER (ORDER BY REGISTER_DT DESC) RNM,
       A.CELLPHONE
  FROM EVENT A, APLUS_V_CUSTOMER_CELLPHONE B
AND A.CELLPHONE = B.CELLPHONE(+) AND A.NAME = B.CUSTOMER_NM(+)
ORDER BY A.REGISTER_DT DESC

 

A테이블보다 B테이블이 많을때 OUT JOIN

반응형
반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
«   2024/11   »
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
글 보관함