Reputation: 2316
Help, please. Is there any other way to display deleted rows in SQL Server except for using trigger and deleted table or writing SELECT before DELETE with the same WHERE clause?
Upvotes: 5
Views: 2544
Reputation: 138960
You can use the output clause of the delete statement.
delete from yourtable
output deleted.*
where ...
Upvotes: 20