SQLite: autoincrement primary key questions

前端 未结 3 1209
囚心锁ツ
囚心锁ツ 2021-01-01 18:45

I have the following SQLite query:

CREATE TABLE Logs ( Id integer IDENTITY (1, 1) not null CONSTRAINT PKLogId PRIMARY KEY, ...
3条回答
  •  囚心锁ツ
    2021-01-01 19:29

    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?:

    Short answer: A column declared INTEGER PRIMARY KEY will autoincrement.

提交回复
热议问题