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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Resetting Key Column Numeration from SQL Tables

Author  Topic 

paradise_wolf
Starting Member

32 Posts

Posted - 2007-05-01 : 12:11:28
I used a lot of fictitious data in order to test the code of my web site. But I noticed that when I deleted all fictitious data from the tables, the primary key columns keep creating automatically numbers that are above the last one before all data was erased instead of starting again from number 1. How do I reset this automatic numeration in order to restart from 1 again ?

AndrewMurphy
Master Smack Fu Yak Hacker

2916 Posts

Posted - 2007-05-01 : 12:19:53
search here for identity_reset....
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2007-05-01 : 12:24:35
...but...the surrogate key number should have no meaning, so with trepidation I ask, why do you care?



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page
   

- Advertisement -