USE dbname
GO
DBCC CHECKIDENT (tablename, RESEED, 0)
GO
it will reset to 0 again, but u r col is primary key not continue insert rows because in that col is not support duplicates.
u r column only auto increment then support but duplicates is there.
but u need last all rows is deleted and reset auto increment value assigned exec perfectly.
This comment has been removed by the author.
ReplyDeleteYOU CAN ALSO USE THE FOLLOWING :-
ReplyDeleteTRUNCATE TABLE tablename
By using the above we can also reset our auto increment field and insert data from 1 but it wont work if there is any primary key or foreign key relationship in the respective table.
Thank you