Skip to content
Advertisement

SQL table primary key’s index is starting at 3

I set the column Id to the primary key and set it to increment but its starting at 3 for some reason. I will post a picture below:
Sql table not incrementing correctly

Advertisement

Answer

You can use the ALTER TABLE statement to reset the auto-increment counter, but I would urge you not to be concerned about it. The value of a primary key is supposed to be “meaningless and unique.” Even across time. It doesn’t matter if it started counting with 3.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement