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 |
|
Riku Tuominen
Starting Member
22 Posts |
Posted - 2002-07-01 : 10:24:54
|
| How do I reset "indentity increment" counter valueafter emptying a table?Increment number still keeps starting from 1402 even if I hademtied the table. In Access I would just compact the tableand autocounter would be reset.I tried shcrink database on SQL server, that did not help. |
|
|
joshb
Yak Posting Veteran
52 Posts |
Posted - 2002-07-01 : 10:29:16
|
| Check out the DBCC command CHECKIDENT in Books Online.Josh |
 |
|
|
Riku Tuominen
Starting Member
22 Posts |
Posted - 2002-07-01 : 10:32:50
|
| Thanks I found old anware on this forum."Thanks very much Turning off then on the identity was enought to reset the counter ! Jonathan" |
 |
|
|
YellowBug
Aged Yak Warrior
616 Posts |
Posted - 2002-07-01 : 10:34:06
|
| Also, if you TRUNCATE TABLE, the identity is reset. |
 |
|
|
|
|
|