[ORACLE] MERGE INTO 문
오라클 MERGE INTO 문
따로 뭐 설명 할것은 없다
MERGE INTO TEST1 T1
USING (SELECT NULL AS N1 , NULL AS V1 FROM DUAL UNION ALL SELECT 1 AS N1 , 'F' AS V1 FROM DUAL) T2 ON ( T1.N1 = T2.N1)
WHEN MATCHED THEN UPDATE
SET T1.V1 = T2.V1
WHEN NOT MATCHED THEN INSERT
(N1,V1)VALUES(T2.N1,T2.V1);
댓글 없음:
댓글 쓰기