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
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 identity column

Author  Topic 

vdpramesh
Starting Member

12 Posts

Posted - 2003-06-18 : 11:07:27
Hi all,
I am having one primary column empid (Numeric) in my table.
for that column i set the identity yes option.
Here my qtn is whenever i inserted into table,the empid value is incresing one by one.What i am facing the problem is ,lets say ,i have added 1000 rows into the table.immediately i have deleted all.
When i add again, the value is starting with 1001,1002...
Is there any option where i can reset the value to 1,2...?
Hope u would have understand!.
Pls help me on this!.
Thanks in Advance!
-Ramesh.

efelito
Constraint Violating Yak Guru

478 Posts

Posted - 2003-06-18 : 11:40:55
Look at checkident in BOL. That will let you do what you asked for.

example:
dbcc checkident('tablename', reseed, 0)

Jeff Banschbach, MCDBA


Edited by - efelito on 06/18/2003 11:46:28
Go to Top of Page
   

- Advertisement -