[SQL] MERGE INTO TABLE ~
Database/SQL
2024. 5. 21. 00:16
MERGE INTO target_table AS target
USING source_table AS source
ON target.matching_column = source.matching_column
WHEN MATCHED THEN
UPDATE SET target.column1 = source.column1, target.column2 = source.column2
WHEN NOT MATCHED THEN
INSERT (column1, column2) VALUES (source.column1, source.column2);
'Database > SQL' 카테고리의 다른 글
[SQL] INSERT INTO TABLE ~ (0) | 2024.05.21 |
---|---|
[SQL] SELECT (0) | 2024.05.21 |
[SQL] 키 (0) | 2024.05.20 |
[SQL] DELETE FROM 테이블 ~ (0) | 2024.05.20 |
[SQL] CREATE TABLE ~ (0) | 2024.05.20 |
@서리★ :: Seory Dev
포스팅이 좋았다면 "좋아요❤️" 또는 "구독👍🏻" 해주세요!