I have an existing table where the first few rows have been deleted. Is it possible to reset the primary key so the existing data Id column changes back to 1,2,3..?
3 Answers
I think this question belongs to SO.
For example you may find renumber primary key helpful
Please see Pinal Dave's blog post: http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/