Mysql primary key since the growth, delete a record and then insert the data again, or the data before the deletion is self-growing?

ID primary key growth
id name
1 zhang
2 liu
3 li
4 wang

insert leng after deleting 4

id name
1 zhang
2 liu
3 li
5 leng

does this make the newly inserted data ID equal to 4?

Mar.07,2021

cannot be written automatically. The primary key id is self-increasing. You can only write id=4, when actively writing. If id=4 has it, it will report an error. There is no way to do it.

Menu