I have the following SQLite query:
CREATE TABLE Logs ( Id integer IDENTITY (1, 1) not null CONSTRAINT PKLogId PRIMARY KEY, ...
IDENTITY (1, 1)-> What does this mean?PKLogIdwhat is this? This doesn’t seem to be defined anywhere- I want
Idto beinteger primary keywithautoincrement. I would like to be able to insert into thisLogstable omittingIdcolumn in my query. I wantIdto be automatically added and incremented. Is this possible? How can I do this?
At the moment when I try to insert without Id I get:
Error while executing query: Logs.Id may not be NULL
I’m not sure whether you’re actually using SQLite according to the syntax of your example.
If you are, you may be interested in SQLite FAQ #1: How do I create an AUTOINCREMENT field?: