The database is set up with the self-add column , sometimes need to clear the database from the new input data .< Span lang= "ZH-CN" the most common practice is to use sql statement " Delete indicates the name ", But when you insert the data again , you'll find that the self-increment column starts with the next value of the last deleted data's maximum value. ,1. is there a feeling , feeling quite distressed
Now there is a simple brute force method that lets you delete data , and when you insert the record again , the self- increment column starts at 1 .
Directly from the table, will need to increment the field to modify, the self-increment this option to cancel, and then save, and then save the field again after the custom, this field will be re-increment from the 1 start:
Above
Emd
SQL: After all the data in the table has been deleted, it is incremented starting from 1 when re-inserting