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.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Identity Seed value setting

Author  Topic 

ourspt
Starting Member

33 Posts

Posted - 2005-01-12 : 23:23:48
Hi,

I have a table for which the primary key is an identity column. Let us say there are 100 records in the table. Now I want some gap in the primary key values. Can I set the identity seed on the primary key to start at a higher value, say 500 (leaving the values 101 to 499 unused for the primary key column)?

Thanks in advance
ourspt

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-01-13 : 00:28:47

dbcc checkident(TableName,reseed,499)

Madhivanan

Go to Top of Page

Ex
Posting Yak Master

166 Posts

Posted - 2005-01-13 : 00:29:04
k if i am understanding
sure ya can

IDENTITY("starting number","increment by")
IDENTITY(500,1)

so

CREATE TABLE aaa(
myidentitycol IDENTITY(500,1),
...rest of table

Go to Top of Page
   

- Advertisement -