Starting with SQL Server 2008, it is possible to perform insert, update, or delete operations in a single statement using the MERGE statement.
The MERGE statement allows you to join a data source with a target table or view, and then perform multiple actions against the target based on the results ...