create table filemanager(oid AUTO_INCREMENT INT PRIMARY KEY,filepath Text unique);
insert into filemanager(filepath)values("c:\a.txt")
select *from filemanager
输出:|c:\a.txt
请告诉我这里缺少的东西。谢谢
答案 0 :(得分:1)
http://sqlite.org/autoinc.html
正确的创建命令是:
create table filemanager (
oid integer primary key autoincrement,
filepath text unique);
答案 1 :(得分:1)
检查此 demo SQLFiddle
AUTOINCREMENT
总是写,
create table filemanager(
ID INTEGER PRIMARY KEY AUTOINCREMENT,
filepath Text unique
);
insert into filemanager(filepath)values("c:\a.txt");
select * from filemanager;