Insert with Output in SQL Server

When inserting records in SQL Server, you can output the results into a temporary or real table, with the OUTPUT clause.

This can be used to return database-generated values without a secondary select, or to act similarly to a trigger, giving you the ability to do something after records get inserted.

View code on GitHub

Comments

Popular posts from this blog

Left Join in Entity Framework

JavaScript Spread Operator

Create Bootable USB from Windows