Created
November 8, 2023 14:11
-
-
Save scanbix/29b366c902bd4731e37f560f4d21bf39 to your computer and use it in GitHub Desktop.
oracle db DML
This file contains 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
#https://oracle-base.com/articles/9i/merge-statement | |
MERGE INTO employees e | |
USING hr_records h | |
ON (e.id = h.emp_id) | |
WHEN MATCHED THEN | |
UPDATE SET e.address = h.address | |
WHEN NOT MATCHED THEN | |
INSERT (id, address) | |
VALUES (h.emp_id, h.address); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment