Http://stackoverflow.com/questions/8519936/sqlite-autoincrement-primary-key-questions
I ' m not sure whether your ' re actually using SQLite according to the syntax of your example.
If you is interested in the SQLite FAQ #1: How does I create an autoincrement field?:
Short answer:a column declared INTEGER PRIMARY KEY would autoincrement.
Http://stackoverflow.com/questions/7905859/is-there-an-auto-increment-in-sqlite
You get the one for free, called ROWID. Every SQLite table whether you ask for it or not.
If you include a-column of type INTEGER PRIMARY KEY, that's column points at (was an alias for) the Automatic ROWID column.
ROWID (by whatever name-call it) are assigned a value whenever you INSERT a row, as you would expect. If you explicitly assign a Non-null value on INSERT, it'll get that specified value instead of the auto-increment. If you explicitly assign a value of NULL on INSERT, it'll get the next auto-increment value.
Also, should try to avoid:
INSERT INTO people VALUES ("John", "Smith");
and use
INSERT INTO people (first_name, last_name) VALUES ("John", "Smith");
instead. The first version is very fragile-if your ever add, move, or delete columns in your table definition the INSERT would eith Er fail or produce incorrect data (with the values in the wrong columns).
Https://www.sqlite.org/autoinc.html
Self-increment primary key in SQLite