Skip to content

Instantly share code, notes, and snippets.

@shaneis
Created April 13, 2018 08:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shaneis/0900760e17bf167d71223dfa4dcaddbb to your computer and use it in GitHub Desktop.
Save shaneis/0900760e17bf167d71223dfa4dcaddbb to your computer and use it in GitHub Desktop.
The code for using OUTPUT with the DELETE statement
DELETE FROM dbo.CustomersTableIdent
OUTPUT deleted.id, deleted.FirstName, deleted.LastName
WHERE id % 5 = 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment