C# Corner
Tech
News
Videos
Forums
Trainings
Books
Events
More
Interviews
Jobs
Live
Learn
Career
Members
Blogs
Challenges
Certifications
Bounties
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
.NET
ADO.NET
Android
ASP.NET
C#
Databases & DBA
Design Patterns & Practices
Java
Learn iOS Programming
OOP/OOD
SharePoint
Software Testing
Web Development
WPF
View All
3
Reply
how to update identity value
Rakesh Kalluri
11y
1.8k
0
Reply
Delete Row
Delete Column
Insert Link
×
Insert
Cancel
Embed YouTube Video
×
Width (%)
Height (%)
Insert
Cancel
Table Options
×
Rows
Columns
First row as header
Create Table
Insert Image
×
Selected file:
Alignment
Left
Center
Right
Select an image from your device to upload
Upload to Server
Cancel
Submit
You need toset identity_insert YourTable ON Then delete your row and reinsert it with different identity.Once you have done the insert don't forget to turn identity_insert offset identity_insert YourTable OFF
Munesh Sharma
11y
0
SET IDENTITY_INSERT Table ON suppose we have to update identity value from 2 to 1 DELETE FROM Table WHERE ID=2INSERT INTO Table(IdentityCol,) VALUES(1)SET IDENTITY_INSERT Table OFF
Khargesh Rajput
11y
0
DBCC CHECKIDENT ('TABLENAME', RESEED, YOUR_SEED_VALUE);
daniel amose
11y
0
Message