-- Set Identity insert on so that value can be inserted into this column
SET IDENTITY_INSERT YourTable ON
GO
-- Insert the record which you want to update with new value in the identity column
INSERT INTO YourTable(UserId, otherCol) VALUES(13,'myValue')
GO
--Now set the idenetity_insert OFF to back to the previous track
SET IDENTITY_INSERT YourTable OFF
Friday, 16 May 2025
How to update Identity Column in SQL Server
Subscribe to:
Post Comments (Atom)
-
Herbal plants to grow in home Different types of keerai ----- http://www.indiandietrecipes.com/2016/03/pictures-of-various-types-of-gree...
-
What is a Mirror A mirror is most often made with a highly polished surface of a metal, placed behind a glass. A mirror works by refle...
No comments:
Post a Comment