On Wed, 20 May 2015 12:36:43 -0700, Scott Doctor
<scott at scottdoctor.com> wrote:

> Given a field that is a primary key with auto-increment, does sqlite 
> store an integer that gets incremented, or does it look at the last row 
> and increment its value?

The autoincrement clause causes an entry in the sqlite_sequence
table.

$ sqlite3 t2.sqlite
SQLite version 3.8.11 2015-05-20 00:15:27
Enter ".help" for usage hints.
sqlite> create table t(id integer primary key autoincrement, tx
text);
sqlite> insert into t (tx) values ('one'),('two');
sqlite> select * from sqlite_sequence;
t|2
sqlite>

-- 
Regards, 

Kees Nuyt


Reply via email to