
MERGE (Transact-SQL) - SQL Server | Microsoft Learn
Sep 8, 2025 · The MERGE statement runs insert, update, or delete operations on a target table from the results of a join with a source table. For example, synchronize two tables by inserting, …
MERGE (Transact-SQL) - SQL Server | Microsoft Learn
Die MERGE-Anweisung führt Einfüge-, Aktualisierungs- oder Löschvorgänge in einer Zieltabelle anhand der Ergebnisse eines Joins mit einer Quelltabelle aus.
OUTPUT clause (Transact-SQL) - SQL Server | Microsoft Learn
The following example captures data returned from the OUTPUT clause of a MERGE statement, and inserts that data into another table. The MERGE statement updates the Quantity column …
Merge WHEN NOT MATCHED BY SOURCE - Microsoft Q&A
Nov 28, 2020 · Here is a simple example that you can play with. The target table initially has the name of the numbers in Finnish, while the source table has them in English. This particular …
Transact-SQL statements - SQL Server | Microsoft Learn
Nov 18, 2025 · This article summarizes the categories of statements for use with Transact-SQL (T-SQL) in addition to the SELECT statement. You can find all of the statements listed in the …
SCD Type 2 : MERGE Update and Insert - Microsoft Q&A
Jan 4, 2024 · Hi All - I am trying to implement a Type 2 Slowly changing dimension in SQL procedure using MERGE. Here are the rules : If its a new record insert into target table with …
T-SQL Surface Area in Fabric Data Warehouse - Microsoft Fabric
Sep 10, 2025 · This article covers the T-SQL language syntax capabilities of Microsoft Fabric, when querying the SQL analytics endpoint or Warehouse. For SQL database in Fabric, see …
WITH common_table_expression (Transact-SQL) - SQL Server
Nov 18, 2025 · A CTE must be followed by a single SELECT, INSERT, UPDATE, MERGE, or DELETE statement that references some or all the CTE columns. A CTE can also be specified …
Query Hints (Transact-SQL) - SQL Server | Microsoft Learn
In a MERGE statement, the source table is accessed before the target table as the default join order, unless the WHEN SOURCE NOT MATCHED clause is specified. Specifying FORCE …
Joins (SQL Server) - SQL Server | Microsoft Learn
Nov 18, 2025 · Because each input is sorted, the Merge Join operator gets a row from each input and compares them. For example, for inner join operations, the rows are returned if they are …