How to reset identity(ID) field
-
I am using SQL server 2000. I have added some records in table. and then deleted. Now I would like ID field to start count from 1 and onward. what command will be used.
God Bless you. Always do good to others
-
I am using SQL server 2000. I have added some records in table. and then deleted. Now I would like ID field to start count from 1 and onward. what command will be used.
God Bless you. Always do good to others
DBCC CHECKIDENT
Check out http://www.mssqlcity.com/FAQ/Devel/reset_identity_column.htm[^]Vasudevan Deepak Kumar Personal Homepage Tech Gossips
-
I am using SQL server 2000. I have added some records in table. and then deleted. Now I would like ID field to start count from 1 and onward. what command will be used.
God Bless you. Always do good to others
-
DBCC CHECKIDENT
Check out http://www.mssqlcity.com/FAQ/Devel/reset_identity_column.htm[^]Vasudevan Deepak Kumar Personal Homepage Tech Gossips
I agree... but what about the relationships and constraints ... if I have a primary key of identity column .. then that statement will generate value that already exists in my table.... m I right?