Skip to content

Instantly share code, notes, and snippets.

@omarrodriguez15
Created January 2, 2020 16:47
Show Gist options
  • Select an option

  • Save omarrodriguez15/f13ec04dddaee5c1835cf2ab98258dae to your computer and use it in GitHub Desktop.

Select an option

Save omarrodriguez15/f13ec04dddaee5c1835cf2ab98258dae to your computer and use it in GitHub Desktop.
BEGIN TRAN
UPDATE person
SET firstname='Omar'
OUTPUT deleted.*, inserted.*
where firstname='Omarr'
ROLLBACK TRAN
--OR
BEGIN TRAN
UPDATE person
SET firstname='Omar'
OUTPUT deleted.firstname, inserted.firstname
where firstname='Omarr'
ROLLBACK TRAN
--firstname firstname
--Omarr Omar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment