Did you know? SQL Server 2008 includes Merge Statement
Common data scenarios require developers to write and maintain logic to determine whether to insert, update or delete information (sometimes called upsert) such as:
1: IF FOUND
2: THEN UPDATE
3: ELSE
4: INSERT
SQL Server 2008 provides the new MERGE statement within the SQL language to enable developers to provide this functionality with a single statement. This allows for code reduction and easier maintainability.
Check out a screencast about the new MERGE Statement in SQL Server 2008 via MSN Soapbox below or youtube or download here.
Read more about this in the SQL Server 2008 BOL ‘Inserting, Updating, and Deleting Data with MERGE’.
