Hello Friends,

Here is another popular lab from Hands-On-Lab library: Merging Data in SQL Server.

MERGE statement is used to modify data in a target table based on data in a source table. The statement joins the target to the source by using a column which is common to both the tables. We can INSERT, UPDATE, or DELETE data from the target table-all in one statement-according to how the rows match up as a result of the join. This lab is divided into five exercises explaining different scenarios where MERGE statement is useful such as INSERT and UPDATE the rows using MERGE, UPDATE and DELETE rows using MERGE and INSERT, UPDATE and DELETE rows using MERGE.

Exercise 1: INSERT and UPDATE the rows using MERGE
Exercise 2: UPDATE and DELETE the rows using MERGE
Exercise 3: INSERT, UPDATE and DELETE the rows using MERGE
Exercise 4: Self-Assessment
Exercise 5: T-SQL Challenge

SQLMaestros Hands-On-Labs enables the practical way of learning. Each lab document consists of multiple exercises and each exercise consists of multiple tasks. Apart from step-by-step instructions, the HOL document contains images, explanations, observations, notes, tips & tricks to ensure a great learning experience. With each lab, you can practice a specific concept step-by-step. With our HOL documents, you will get hands-on with hundreds of topics in SQL Server & Microsoft Data Platform. Learn More.

Learn More



Happy Learning – The Practical Way.

Data Platform Virtual Summit 2020

Subscribe to SQLMaestros YouTube channel. If you want more learning content in your inbox, subscribe to SQLMaestros Bulletin.

SQLMaestros YouTube | SQLMaestros Bulletin | SQLMaestros Twitter