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-02-04 : 00:41:11
|
| Ben Smith writes "I have 50 test records in our SQL Server 6.5 database "ServiceCallTable" and I have deleted 49 of the rows easily enough. What happened though is since I have an autonumber field, when adding another record the next id # is 51. I want it to go back to id # 2 since I deleted the other 49.How do I go about telling SQL Server to not remember the 49 rows that I deleted and generate the correct next id #?Any help would be greatly appreciated.Thanks. Ben Smith" |
|
|
TonyH
Starting Member
29 Posts |
Posted - 2002-02-04 : 04:50:32
|
| Hi,Check out 'set identity_insert' in BOL. Alternatively,you could truncate the table (I believe this resets the identity to it's seed), and re-insert the first row again.TonyHwww.SQLCoder.com - Free Code generation for SQL Server 7/2000 |
 |
|
|
|
|
|