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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-05-20 : 08:35:08
|
| Robert writes "I have a situation where I would like to move my autoindexed primary key to a number say 1000 higher than it currently is...For example, I am currently at row 100, I'd like the next insert to be at row 500, skipping over the other numbers..How can this be done?I am using, sadly, SQL Server 6.0Thanks!!!!!!!!!" |
|
|
Nazim
A custom title
1408 Posts |
Posted - 2002-05-20 : 09:01:08
|
| Ah! i havent come across 6.0 ever .Anywayz you can reset your identity with DBCC CHECKIDENT for more scan thru BOL.HTH-------------------------------------------------------------- |
 |
|
|
mfemenel
Professor Frink
1421 Posts |
Posted - 2002-05-20 : 13:18:17
|
| set identity insert on and insert a dummy record with the new value you want as the base of your identity column. SQL should then use that as the highest identity and increase from there. For example if you insert an identity of 500, SQL would then start off with 501 when the next record is inserted.Mike"oh, that monkey is going to pay" |
 |
|
|
M.E.
Aged Yak Warrior
539 Posts |
Posted - 2002-05-20 : 15:38:14
|
| n/m... 6.0 ;)Edited by - M.E. on 05/20/2002 15:38:48 |
 |
|
|
|
|
|