[
https://issues.apache.org/jira/browse/CALCITE-4338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17477149#comment-17477149
]
Xurenhe commented on CALCITE-4338:
----------------------------------
Postgresql also supports this syntax, doc:
https://www.postgresql.org/message-id/attachment/23520/sql-merge.html
> Support MERGE INTO Clause
> -------------------------
>
> Key: CALCITE-4338
> URL: https://issues.apache.org/jira/browse/CALCITE-4338
> Project: Calcite
> Issue Type: Improvement
> Reporter: Forward Xu
> Priority: Major
>
> {code:java}
> MERGE INTO target_table
> USING source_table
> ON search_condition
> WHEN MATCHED THEN
> UPDATE SET col1 = value1, col2 = value2,...
> WHERE <update_condition>
> [DELETE WHERE <delete_condition>]
> WHEN NOT MATCHED THEN
> INSERT (col1,col2,...)
> values(value1,value2,...)
> WHERE <insert_condition>;
> {code}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)