SQL SERVER- Reseed Identity Column

Most of the developers come around this question,can we reseed a identity column?The answer is yes.There is a DBCC command to Re-seed the identity value.

–Reseed the identity column

Format: DBCC CHECKIDENT (table_name,reseed,reseed_value)

Example : DBCC CHECKIDENT (t2,reseed,0)

Here the table again starts the identity value from 1,2,3…

print

Leave a Reply

Your email address will not be published. Required fields are marked *


+ 4 = nine