Hello
I saw some discussions here about using the word "AUTOINCREMENT" for a primary 
key or not.
 
Sometimes the meaning is "INTEGER PRIMARY KEY" is enough, because this will 
also make an auto increment id.
 
Can someone give me a clarification if "AUTOINCREMENT" is needed or not?
In the FAQ I can read this;
" The new key will be unique over all keys currently in the table, but it might 
overlap with keys that have been previously deleted from the table."
 
Does this mean, if there are 10 rows with id 1 -10 and I delete row with id 5, 
then the next insert will be ID = 5?
Or is next ID = 11?
 
I understand that if I need absolutely unique IDs over the lifetime I need to 
use AUTOINCREMENT. That's correct?
And with AUTOINCREMENT the last IDs will be stored in a table 
"sqlite_sequence"?[https://3c.web.de/mail/client/dereferrer?redirectUrl=http%3A%2F%2Fsqlite.org%2Ffileformat2.html%23seqtab]
Are there sow disatvantages of using AUTOINCREMENT , like SQLite is slower or 
something else?
 
best regard
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to