Discussion Locked

IDENTITY COLUMN

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have an identity column in my table and after deleting all the rows of a table (say 10 rows, where last identity value is 10. ) if I start inserting rows the identity value is coming 11, which is not required.
I want to restart my Identity columnvalues from 1.....I tried from Enterprise Manager by deleting Identity column and again creating it, but it didn't work.

Please give me the solution.

3 replies

by raffi_

You need to issue a "TRUNCATE TABLE name" command. This will delete any rows, reset the counter and NOT log the deletes in the transaction log.

Regards
Raffi_

This discussion is closed to new replies.