When i run this create table query in sqlite
CREATE TABLE Device
(DeviceNO INT PRIMARY KEY,
ID INTEGER AUTOINCREMENT,
IP TEXT,
Port INT,
DeviceGroup INT,
Password TEXT,
Type INT,
IsAutoConnectDevice BOOL,
IsAutoConnectAmin BOOL,
Placement TEXT,
PrinterName TEXT);
shows me an error like this
near "AUTOINCREMENT": syntax error:
whats the problem? is there any way to create a auto inc field without make it primary key?
You can only AUTOINCREMENT
a fields declared as INTEGER PRIMARY KEY
, and none others.