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

DotNet CLI

Switch Expressions

Nullable reference types