I am using SQL Server 2005. In some of my tables, I am using Auto-
Number ID fields. While testing my app. with test data, these ID
fields have incremented to a large number. Though it is not of much
importance, but I want that when I deploy a fresh copy these ID fields
must start from 1.2 ways
1 truncate table (if you don't have FK - PK relationships)
2 DBCC CHECKIDENT (TableName, RESEED, 0)
Denis The SQL Menace
http://sqlservercode.blogspot.com
http://sqlblog.com/blogs/denis_gobo/default.aspx
On Aug 23, 9:43 am, RP <rpk.gene...@.gmail.com> wrote:
> I am using SQL Server 2005. In some of my tables, I am using Auto-
> Number ID fields. While testing my app. with test data, these ID
> fields have incremented to a large number. Though it is not of much
> importance, but I want that when I deploy a fresh copy these ID fields
> must start from 1.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment