Three results side by side. INSERT with OUTPUT shows the two new rows with SeedID 6 and 7. UPDATE with OUTPUT shows old and new Packets for four rows. DELETE with OUTPUT shows the two removed rows, Mint and Okra

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.

Read More