AUTO_INCREMENT in sqlite problem with python

前端 未结 4 899
执笔经年
执笔经年 2020-12-29 08:57

I am using sqlite with python 2.5. I get a sqlite error with the syntax below. I looked around and saw AUTOINCREMENT on this page http://www.sqlite.org/syntaxdiagrams.html#c

4条回答
  •  悲&欢浪女
    2020-12-29 09:27

    You could try

    CREATE TABLE fileInfo
    (
    fileid INTEGER PRIMARY KEY AUTOINCREMENT,
    name STRING,
    status INTEGER NOT NULL
    );

提交回复
热议问题