I am using SQLite3. I load a table with say 30 rows using integer as Primary ID and it auto-increments.
Now I delete all the rows from the table and then, reload some new information onto the table.
Problem is: the row count (my PrimaryID) now starts with 31. Is there any way that I can start loading new rows from the number 1 onwards?
SQLite
Use:
Documentation
Found the answer on SO: SQLite Reset Primary Key Field
MySQL
Use:
In either case, the database doesn’t care if the id numbers are sequencial – only that the values are unique. If users never see the primary key value (they shouldn’t, because the data can change & won’t always be at that primary key value), I wouldn’t bother with these options.