Click here to Skip to main content
15,884,689 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
I have a SQL table with ID auto increment field.

the problem is, user has a clear button, that does delete from notes where id user = ...

so when it's added new elements, 'something' field starts on the last value, i.e., with the field cleared for id user = x, 'something' field starts on 32 (for example).

I want that start on 1 again, without using Truncate SQL Statement.

Is it possible? Using SQL Server 2008.

update trick field to -1, is not an option for me.

SOLVED: :)

DBCC CheckIdent ('Notes', ReSeed , 0)
Posted
Updated 3-Jan-11 8:33am
v4

Answered just to remove it from the unanswered list - solved by OP.
 
Share this answer
 
Have a look at this Tip/Trick

Reset Table Identity[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900