File tree Expand file tree Collapse file tree 1 file changed +26
-9
lines changed
source/reference/operator/aggregation Expand file tree Collapse file tree 1 file changed +26
-9
lines changed Original file line number Diff line number Diff line change @@ -118,15 +118,32 @@ following summarizes the capabilities of the two stages:
118118 however, can be sharded.
119119 - - Can output to a sharded collection. Input collection can
120120 also be sharded.
121- * - - Corresponds to SQL statements:
122-
123- - ``INSERT INTO T2 SELECT FROM T1``
124- - ``SELECT INTO T2 FROM T1``
125- - - Corresponds to SQL statements:
126-
127- - ``MERGE``
128- - ``INSERT INTO T2 SELECT FROM T1``
129- - ``SELECT INTO T2 FROM T1``
121+ * - - Corresponds to the SQL statements:
122+
123+ - .. code-block:: sql
124+ :copyable: false
125+
126+ INSERT INTO T2 SELECT * FROM T1
127+
128+ - .. code-block:: sql
129+ :copyable: false
130+
131+ SELECT * INTO T2 FROM T1
132+
133+ - - Corresponds to the SQL statement:
134+
135+ - .. code-block:: sql
136+ :copyable: false
137+
138+ MERGE T2 AS TARGET
139+ USING (SELECT * FROM T1) AS SOURCE
140+ ON MATCH (T2.ID = SOURCE.ID)
141+ WHEN MATCHED THEN
142+ UPDATE SET TARGET.FIELDX = SOURCE.FIELDY
143+ WHEN NOT MATCHED THEN
144+ INSERT (FIELDX)
145+ VALUES (SOURCE.FIELDY)
146+
130147 - Create/Refresh Materialized Views
131148
132149Behaviors
You can’t perform that action at this time.
0 commit comments