mardi 3 février 2015

Compress DB by removing unused PRIMARY KEY AUTOINCREMENTAL INTEGER

Using SQLite3 I got following table:



| Idx | Foo | Bar |
|-----|-------|---------|
| 1 | It's |something|
| 2 | and | even |
| 5 | more |wildcard |


Idx is INTEGER PRIMARY KEY AUTOINCREMENTAL.


As you see Idx 3 and 4 are unused due they got deleted. Can I make these Idx usable again?


I'm not very firm with SQL but afaik, I need autoincremental to identify the row without a doubt, every other column could have doublets.


Aucun commentaire:

Enregistrer un commentaire