Lily
Lily

Reputation: 1

how to change the maxium existing value on sql server?

I have deleted a row in my database with the value of 8. the problem is when I add the next row the auto number starts with 9 not 8. it stills consider the maxium existing value equal to the row whivh was already deleted. how can I fix this?

Upvotes: 0

Views: 24

Answers (1)

s241k
s241k

Reputation: 39

You can use:

DBCC CHECKIDENT ('tableName', RESEED, 7);
GO

Upvotes: 1

Related Questions