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 @@ -123,15 +123,32 @@ following summarizes the capabilities of the two stages:
123123 however, can be sharded.
124124 - - Can output to a sharded collection. Input collection can
125125 also be sharded.
126- * - - Corresponds to SQL statements:
127-
128- - ``INSERT INTO T2 SELECT FROM T1``
129- - ``SELECT INTO T2 FROM T1``
130- - - Corresponds to SQL statements:
131-
132- - ``MERGE``
133- - ``INSERT INTO T2 SELECT FROM T1``
134- - ``SELECT INTO T2 FROM T1``
126+ * - - Corresponds to the SQL statements:
127+
128+ - .. code-block:: sql
129+ :copyable: false
130+
131+ INSERT INTO T2 SELECT * FROM T1
132+
133+ - .. code-block:: sql
134+ :copyable: false
135+
136+ SELECT * INTO T2 FROM T1
137+
138+ - - Corresponds to the SQL statement:
139+
140+ - .. code-block:: sql
141+ :copyable: false
142+
143+ MERGE T2 AS TARGET
144+ USING (SELECT * FROM T1) AS SOURCE
145+ ON MATCH (T2.ID = SOURCE.ID)
146+ WHEN MATCHED THEN
147+ UPDATE SET TARGET.FIELDX = SOURCE.FIELDY
148+ WHEN NOT MATCHED THEN
149+ INSERT (FIELDX)
150+ VALUES (SOURCE.FIELDY)
151+
135152 - Create/Refresh Materialized Views
136153
137154Behaviors
You can’t perform that action at this time.
0 commit comments