how to increment ID to 1.2.3.4 etc not 1000,2000,3000

how to increment ID to 1.2.3.4 etc not 1000,2000,3000

Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jaimin ShethiyaPosted Jul 22, 2024, 7:16 AM
Hello Mohammad,
Please refer this below links.
https://learn.microsoft.com/en-us/answers/questions/517365/sql-server-id-jump-1000-issue-fixed-in-sql-server
https://stackoverflow.com/questions/14146148/identity-increment-is-jumping-in-sql-server-database
Thanks
Aman GuptaPosted Jul 22, 2024, 5:03 AM
Hi MohammadEid,
If you have an existing table and need to reset the
IDENTITYproperty:Check Current Identity:
Reset Identity to a specific value:
This sets the next ID to start from 1 again. If you need a custom increment logic (e.g., 1, 2, 3, 4), use a custom sequence or handle it programmatically.
Naveen KumarPosted Jul 21, 2024, 3:29 PM
Hi MohamedEid,
If the ID column is already set as an IDENTITY, you can truncate the table and reinsert the data. Otherwise, you can configure the column as an IDENTITY following below steps.
IDENTITYcolumn.Tahir AnsariPosted Jul 21, 2024, 1:39 PM
Hi Mohammad,
This statement adds a new
IDcolumn toExistingTablewith theIDENTITYproperty starting from 1 and incrementing by 1.