In linux, on the command line (sqlite3), I use the following version of Sqlite:
SQLite version 3.7.6.3
In an sqlite tutorial (http://sqlite.org/autoinc.html) I have read the following statement:
On an INSERT, if the ROWID or INTEGER PRIMARY KEY column is not explicitly
given a value, then it will be filled automatically with an unused integer,
usually one more than the largest ROWID currently in use.
I have the following table (.schema addresses):
CREATE TABLE addresses (
id int primary key not null,
ipaddr text not null,
locked int,
date text not null,
quater int,
count not null);
CREATE INDEX addresses_index1 on addresses (ipaddr);
Now, if I am inserting the following row as mentioned above (no values for id), it does not work:
insert into addresses (ipaddr, locked, date, quater, count) values
('0.0.0.0', 0, '2016/12/13', 0, 1);
I get the error message
Error: addresses.id may not be NULL
But the tutorial said that I can do it exactly this way.
What am I doing wrong?