SpiceQA
Questions Tags Users Badges

How to reindex primary key in tkinter sqlite3

user_16772140 0
Created Jan 3, 2022 Edited Jan 3, 2022
Viewed 79

This is my id number which comes from the database but when I delete a data the index number will not be updated, please help me if there is any solution to reindex

sql python
Share
1 Answers

Based on the SQLite documentation, I'd say:

c.execute("REINDEX <table_name>")
con.commit()

where <table_name> is your table name, obviously.

edited Jan 3, 2022
user_20090470
answered Jan 3, 2022
Related
Terms of service Privacy policy
Powered by Answer