+ 1
How to reset id in MySQL
I made a program with Python and link it with MySQL database ,and when I removed all date from MySQL id wasn't reset .
2 Antworten
+ 2
Are you removing by deleting, dropping, or truncating?
https://pynative.com/JUMP_LINK__&&__python__&&__JUMP_LINK-mysql-delete-data/
+ 2
If you used Delete statement, u need to set the auto increment to 1 by altering the table, but that's not a good idea..
If you are certain that all the data should be removed, at that point u should use truncate statement, it is fast and it resets the autoincrement