Capturing Updated records
suggest changeSometimes one wants to capture the records that have just been updated. OUTPUT and tables whose names start with # are SQL Server syntax.
CREATE TABLE #TempUpdated(ID INT)
UPDATE TableName SET Col1 = 42
OUTPUT inserted.ID INTO #TempUpdated
WHERE Id > 50
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents