Created
March 6, 2013 09:24
-
-
Save MRdNk/5098026 to your computer and use it in GitHub Desktop.
IDENTITY_INSERT example
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
| -- SET IDENTITY_INSERT to ON. | |
| SET IDENTITY_INSERT products ON | |
| GO | |
| -- Attempt to insert an explicit ID value of 3 | |
| INSERT INTO products (id, product) VALUES(3, 'garden shovel'). | |
| GO | |
| SET IDENTITY_INSERT products OFF |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Taken from: http://msdn.microsoft.com/en-us/library/aa259221(v=sql.80).aspx