|
-
Mar 25th, 2008, 04:12 PM
#1
Thread Starter
Hyperactive Member
SQL Server - Reinitialize auto-increment values
Hi,
I have around 10-15 tables that I want to clear.
Is there a quick way (in a script) to have the auto-increment field restart at 1 ?
Thank you.
-
Mar 25th, 2008, 05:04 PM
#2
Addicted Member
Re: SQL Server - Reinitialize auto-increment values
DBCC CHECKIDENT ("tablename", RESEED, 1);
-
Mar 27th, 2008, 11:02 AM
#3
Re: SQL Server - Reinitialize auto-increment values
Or just truncate the table, that will reset the identities... (but that requires more permissions)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|