출처 : http://blog.naver.com/plzyouloveme/100063567941

merge into target_table_name          <-- update 또는 insert할 테이블
using (table|view|subquery)           <-- 비교 대상 테이블
on(join condition)                    <-- target_table 과 비교테이블 비교조건
when matched then                     <-- on절에서 matche면
     update set = col1 = val1....     <-- update
when not matched then                 <-- not match면
    insert into(...) values(...)      <-- insert

예제 : 

근데 dual 를 쓰면 DB에도 메모리 먹는다고해서(?) 걍 시스템 테이블로 사용해서 rownum = 1 로 하자,,
그리고 Alias 'S' 테이블에는 꼭 한 건의 데이터가 필요하므로 참고 (Alias 'S' 테이블에 데이터 건 수가 없으면
WHEN MATCHED THEN 조건은 타지만, NOT MATCHED 조건은 안 탄다, 그리고 INSERT 시에 PK 제약 조건의 에러가 나면 S 테이블에 데이터 건 수가
여러건인지 확인 해보자.