Five Secret MERGE Patterns

The MERGE statement was introduced into the SQL Standard with SQL2003 and into SQL Server with version 2008. SQL Server goes far beyond the standard and implements the MERGE statement as a very powerful combination of the three statements INSERT, UPDATE and DELETE.

In this talk I am going to show five use cases that you might not have thought of before. We will also cover some issues that you must be aware of to avoid problems when using the MERGE statement.

This is a 100 level No-Slide-Demo-Only talk. To get the most out of it you should feel comfortable using the INSERT, UPDATE and DELETE statements and write simple join queries.

Sebastian Meine

Sebastian Meine, Ph.D. is the SQL Stylist behind llc. In 2010 he founded to fully engage in his passion for SQL Server.

Armed with a Ph.D. in Computer Science and years of experience in architecting DBs for a global Fortune 50 company, Sebastian now provides training and consulting services for his clients, specializing in SQL Server Security, Test Driven Development, and Performance. Sebastian is an experienced public speaker, published author, president of the Philly PASS Chapter, PASS Regional Mentor and coauthor & lead developer of tSQLt.