Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
taunt
Posting Yak Master
128 Posts |
Posted - 2011-01-10 : 11:54:26
|
Hello, how do I Change the starting number to a auto numbered field in sql? Say the table is items, and I need to change it to start at 40,000. What would be that correct command.Thanks |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-01-10 : 11:57:45
|
you need to create an identity column in table and set the seed value as 40000. it will be likeALTER TABLE Items ADD ID int IDENTITY(40000,1) NOT NULL ------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2011-01-16 : 17:54:57
|
DBCC CHECKIDENT('Table1', RESEED, 39999) N 56°04'39.26"E 12°55'05.63" |
|
|
|
|
|