Skip to content

Instantly share code, notes, and snippets.

@shaneis
Created April 13, 2018 08:56
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/d9a84f52ea4f1680b6664c181c1ecf62 to your computer and use it in GitHub Desktop.
Save shaneis/d9a84f52ea4f1680b6664c181c1ecf62 to your computer and use it in GitHub Desktop.
Shows how to use OUTPUT with the INSERT statement
INSERT INTO dbo.CustomersTableIdent (FirstName, LastName)
OUTPUT inserted.id, inserted.FirstName, inserted.LastName
VALUES ('My first name', 'My last name');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment