Top "Output-clause" questions

@@IDENTITY, SCOPE_IDENTITY(), OUTPUT and other methods of retrieving last identity

I have seen various methods used when retrieving the value of a primary key identity field after insert. declare @t …

sql sql-server tsql identity output-clause
Output to Temporary Table in SQL Server 2005

I am trying to use the OUTPUT clause inside a stored procedure to output to a temporary table the values …

sql-server-2005 output-clause
DELETE ... OUTPUT COUNT(DELETED.*)

I want to know how many rows were removed in a certain DELETE operation. I took the Microsoft example B …

sql sql-server output-clause
SQL Server: Multiple Output Clauses

I have two tables, Table_1 and Table_2. Table_1 has columns PK (autoincrementing int) and Value (nchar(10)). Table_2 has FK (int), …

sql-server output-clause
How to use output clause in SQL to output insert, update, delete results into new temporary table?

Currently, I'm trying to perform an update in SQL Server (but it could be any DML statement that supports the …

sql tsql output-clause