- WHEN MATCHED
- WHEN NOT MATCHED BY TARGET
- WHEN NOT MATCHED BY SOURCE
Merge use to check if values match in both Source and Target, which is equal to WHEN MATCHED and an UPDATE is fired. When value exist in SOURCE table but not in TARGET table then WHEN NOT MATCHED [ BY TARGET ] then INSERT the new value and if the value exist in TARGET and not in SOURCE then WHEN NOT MATCHED [BY SOURCE] and DELETE is fired.
To know more http://msdn.microsoft.com/en-us/library/bb510625.aspx