You can update the ID but the table will have new ID 8 instead of 7. You can drop the ID column and then add it back so it will starts counting from 1.
You can update the ID but the table will have new ID 8 instead of 7. You can drop the ID column and then add it back so it will starts counting from 1.
I just checked SQLite related websites. It is not possible to drop the column and add primary key column. You will need to create a new temporary table, copy the data from the old table, drop the table then rename the new temporary table to the old table name. If you are not doing it by SQL syntax, using software like DBBrowser may simplifies the job.
If the table stores transactions, you may not want to delete any records. Just add a column for void and set it as true if the sales is cancelled then filter the records for void equals false for actual sales.