Capturing Updated records

suggest change

Sometimes 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

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents