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 Development (2000)
 How to reset the identity field

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-08-29 : 07:24:15
Bijay writes "Dear All,
Let i have a table with two field,like Cr_Date as Datetime and Cr_id as smallint with identity field for this field.Then i create a table.After that i am inserting the records into the table as the transaction started i am inserting the current date into the date field and the corresponding identity field value into the id filed.ok fine.Now when the next day transaction will start the Cr_id field should reset and insert.How i will achive this.

Can u send me an example.

Thanks & Regards,
Bijay"

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-08-29 : 07:27:36
DBCC CHECKIDENT (tableName, RESEED, 0)

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -