This statement was introduced with SQL SERVER 2008 The MERGE statement gives you the ability to compare rows in a source and target table. You can then define the appropriate INSERT, UPDATE, or DELETE command to be performed based on the results of the comparison.
A common merge scenario is moving data from one table to another. So all moving activity can be done by one statement and this is good for optimizing the performance .
Let's see this Example:
No comments:
Post a Comment