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
 General SQL Server Forums
 New to SQL Server Programming
 identity seed

Author  Topic 

Irina518
Starting Member

2 Posts

Posted - 2012-02-22 : 06:55:37
Hello everyone,
I need help please.

I have a table with 10,000 records
I have 2 test groups:
1.ID from 1 to 99
2.ID from 200,000,000 to 200,000,999.
on column properties i have set:
"identity specification" to YES
"identity increment" to 1
"identity seed" to 100

when i inserts a new record it gets ID over 200,000,000.
how can i make the new records to get id in range [100-200000000]?

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2012-02-22 : 08:40:22
dbcc checkident(reseed,100)
Go to Top of Page

Irina518
Starting Member

2 Posts

Posted - 2012-02-22 : 09:07:55
something like this?

dbcc checkident(table_name,reseed,100)

when i execute that line i can no longer insert new records...

Go to Top of Page

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2012-02-23 : 08:07:55
What is the error when you try to insert now?

I am guessing you got your numbers wrong, but need you to confirm it.
Go to Top of Page
   

- Advertisement -