Created
February 6, 2017 20:32
-
-
Save jetstreamin/8c762cac181d285ac325af3673c658e0 to your computer and use it in GitHub Desktop.
SQL OUTPUT for Inserts & Updates
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INSERT INTO [TaskComments] ([TaskId], [CommentId]) | |
OUTPUT INSERTED.TaskId, INSERTED.CommentId, GETDATE() AS 'Created' | |
VALUES (24, 44) | |
UPDATE Tasks SET Completed = '02-22-2017' OUTPUT INSERTED.Completed, DELETED.Completed WHERE Id = 79 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment