SQLite/SQL - clear all "non-used" IDs
#1

Hello...

I couldn't find a way...

I use "ID AUTO INCREMENT"... When I delete one of them, it skips deleted one and continues in other.

Explanation...

ID 1 - IDIOT, Admin level 4
ID 2 - IDIOT_2, Admin level 4
ID 3 - IDIOT_3, Admin level 4
ID 4 - IDIOT_4, Admin level 4

When I delete 'IDIOT_3' and add one again, it doesn't work like I want.. : (/adduser IDIOT_3 4)
It does...

ID 1 - IDIOT, Admin level 4
ID 2 - IDIOT_2, Admin level 4
ID 4 - IDIOT_4, Admin level 4
ID 5 - IDIOT_3, Admin level 4


Is there any way to keep database, but clear those "unusable ids" ?

Thanks, hope you understand.
Reply
#2

That's how AUTO_INCREMENT works. It doesn't re-use deleted indexes, it just adds one to the last value.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)