node-sqlite3
node-sqlite3 copied to clipboard
Error: SQLITE_ERROR: near "AUTO_INCREMENT": syntax error
id INTEGER NOT NULL AUTO_INCREMENT,
Does not work like standard SQL
How has anyone else setup a primary key with auto increment?
This is what I did,
CREATE TABLE sample (id INTEGER NOT NULL AUTO_INCREMENT, column2 TEXT, PRIMARY KEY('id'))
with auto increment, works just fine.
Thoughts?
Please try CREATE TABLE sample (id INTEGER PRIMARY KEY AUTOINCREMENT, column2 TEXT).