Duration: 18:26 min
Summary: In this video, we will discuss the output clause and the merge statement. SQL Server Books Online defines the output clause as: Returns information from, or expressions based on, each row affected by an INSERT, UPDATE, DELETE, or MERGE statement. These results can be returned to the processing application for use in such things as confirmation messages, archiving, and other such application requirements. The results can also be inserted into a table or table variable. Additionally, you can capture the results of an OUTPUT clause in a nested INSERT, UPDATE, DELETE, or MERGE statement, and insert those results into a target table or view.
Today, we will look at examples using the output clause. We will also discuss the use of the merge statement.