Problem with AUTO INCREMENT
Posted: 31.03.2007, 17:02
It seems quite tempting to activate the "Auto Increment" checkbox in the "Change table field" Dialogue of SQLite Administrator. However, this function seems to PREVENT Sqlite from generating Auto Increment IDs.
I had no success with the resulting SQL-Statement:
CREATE TABLE [image] (
[id] INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
[filename] VARCHAR(255) NOT NULL
)
but when I changed to
CREATE TABLE [image] (
[id] INTEGER PRIMARY KEY,
[filename] VARCHAR(255) NOT NULL
)
my table showed the desired behaviour.
I had no success with the resulting SQL-Statement:
CREATE TABLE [image] (
[id] INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
[filename] VARCHAR(255) NOT NULL
)
but when I changed to
CREATE TABLE [image] (
[id] INTEGER PRIMARY KEY,
[filename] VARCHAR(255) NOT NULL
)
my table showed the desired behaviour.