|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
altering identity column seed on a table
I have a table with about half a million records and an identity column.
I am trying to change the seed value of the identity column to give a new value. It gives me a timeout error repeatedly. The database is local on my machine. All I want to do is change the seed value of identity column of an existing table with a half million records and foreign key constraint on this column with six tables. Any help is appreciated. Thanks Raj |
|
#2
|
||||
|
||||
|
The best way to do this (and this is how SQLServer does it internally) is to export your data to a temp table with the new seed setup, drop your old table, then rename your temp table to the name of the old one. ugly stuff.
|
|
#3
|
|||
|
|||
|
Thanks for the solution.
It could be ugly but works for me. Thanks again. Raj |
![]() |
| Viewing: Dev Articles Community Forums > Databases > Microsoft SQL Server > altering identity column seed on a table |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|