Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

AUTOINCREMENT

CREATE TABLE people ( id INTEGER PRIMARY KEY AUTOINCREMENT, username TEXT ); INSERT INTO people (username) VALUES ('foo'); INSERT INTO people (username) VALUES ('bar'); SELECT * from people;
$ sqlite3 demo.db < autoincrement.sql 1|foo 2|bar $ rm -f demo.db