After you delete the records from the table run the following:
DBCC CHECKIDENT('[your table name goes here]', RESEED, 0)
----- Original Message -----
From: "Eva Li" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, July 21, 2005 9:45 AM
Subject: [AspNetAnyQuestionIsOk] How to reset AutoNumber (Identity ) in SQL
database
> Hi All,
>
> Can any body tell me how to reset AutoNumber, i.e. identity value starting
> from 1?
>
> I'd like to clean all the testing data from SQL database and have the
> identity value
> start from 1. I used to generate script and recreate tables. I think
> there should be
> a way to do this without recreating the table. Any body knows how?
>
> Thanks!
>
> Eva
>
>
> [Non-text portions of this message have been removed]
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/