Created
September 25, 2023 18:19
-
-
Save admir-live/bd2194990dd41e444048ec769f2ffcb0 to your computer and use it in GitHub Desktop.
Solution.sql
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 target_table AS target | |
| USING source_table AS source | |
| ON target.id = source.id | |
| WHEN MATCHED THEN | |
| UPDATE SET target.column1 = source.column1, target.column2 = source.column2 | |
| WHEN NOT MATCHED THEN | |
| INSERT (id, column1, column2) VALUES (source.id, source.column1, source.column2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment