+ 2

Hmm. But in the case we delete a row (toghether with the ID) there will be a gap between the sequence of the ID's. Does auto_increment fill that gap when a new user is created, or will it just add 1 to the last id in the table?

2nd Apr 2016, 3:19 PM
Pinzariu Teodor
Pinzariu Teodor - avatar
1 Odpowiedź
+ 2
AI (Auto Increment) will add 1 to the previous id, no matter if the previous row was deleted or not. So if you have 7 rows with assigned id from 1-7, and if you delete let's say row id 6, and create a new row, the id of new row will be 8.
21st Jun 2016, 4:52 PM
jwpark