Click here to Skip to main content
15,894,460 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi friends,
I want to set starting value for identity column as 111 rather than 0.
How can I set this value ?
Thank you all
Posted
v2

In SSMS, create your INT column, and open the "Identity Specification" branch of it's properties. Set the "Identity Seed" value to 111 after you have specified "Is Identity" as "Yes"
 
Share this answer
 
You can use
XML
DBCC CHECKIDENT (<tablename>, RESEED, <newvalue>)

to set the field to whatever you want. For your example:
XML
DBCC CHECKIDENT (<tablename>, RESEED, 110)


Note that this will only affect new records. Already existing records will not be affected.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900