Using SQL Server's Output Clause
Posted
on SQL Server Central
See other posts from SQL Server Central
Published on Mon, 26 Mar 2012 06:00:00 UT
Indexed on
2012/03/26
11:40 UTC
Read the original article
Hit count: 202
When you are inserting, updating, or deleting records from a table, SQL Server keeps track of the records that are changed in two different pseudo tables: INSERTED, and DELETED. These tables are normally used in DML triggers. If you use the OUTPUT clause on an INSERT, UPDATE, DELETE or MERGE statement you can expose the records that go to these pseudo tables to your application and/or T-SQL code.
© SQL Server Central or respective owner