SQL Server emergency? Email pinal@sqlauthority.com with URGENT in the subject line.

Output Clause in Simple Examples: See the Rows You Just Changed

The OUTPUT clause shows the exact rows an INSERT, UPDATE or DELETE just changed, using the inserted and deleted tables. This post covers the output clause in simple examples with a small table of seed packets. It also shows how to save the rows with INTO, what error you get for the wrong table, and why triggers change the rules.

Continue Reading