Created
April 29, 2014 06:59
-
-
Save sankars/11392552 to your computer and use it in GitHub Desktop.
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
| -- From http://stackoverflow.com/questions/121243/hidden-features-of-sql-server | |
| DELETE FROM (table) | |
| OUTPUT deleted.ID, deleted.Description | |
| WHERE (condition) | |
| INSERT INTO MyTable(Field1, Field2) | |
| OUTPUT inserted.ID | |
| VALUES (Value1, Value2) | |
| UPDATE (table) | |
| SET field1 = value1, field2 = value2 | |
| OUTPUT inserted.ID, deleted.field1, inserted.field1 | |
| WHERE (condition) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment