Created
October 21, 2013 01:47
-
-
Save springcome/7077549 to your computer and use it in GitHub Desktop.
merge into, oracle
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MERGE INTO MEMBER M | |
USING DUAL | |
-- 업데이트를 할것인지 인서트를 할것인지의 조건 | |
ON (M.MEMBER_ID = ?) | |
WHEN MATCHED THEN | |
-- 조건에 맞으면 업데이트 | |
UPDATE SET MEMBER_UPDATE = ? | |
WHEN NOT MATCHED THEN | |
-- 조건에 맞지 않으면 인서트 | |
INSERT ( | |
MEMBER_ID | |
, MEMBER_UPDATE | |
) VALUES ( | |
? | |
, ? | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment