Eduardo Pivaral takes us through the OUTPUT
clause:
Even when the code is easy to read, but if you use this pattern over all your codebase, maintain it can become difficult if you have to change object names or implement it on another system.
T-SQL language provides theĀ OUTPUT clause, that allows you to retrieve information from a DML statement in the same batch.
This is pretty useful for performance tuning in some scenarios, but also for simplifying multi-step processes.