create table test (
[tkid] integer PRIMARY KEY autoincrement,-- 设置主键
[tktype] int default 0,
[tableid] varchar (50),
[createdate] datetime default (datetime('now','localtime')) -- 时间
);
INSERT INTO test(tkid,tktype,tableid) VALUES(1,2,'32432')
INSERT INTO test(tkid,tableid) VALUES(2,'22232432')
INSERT INTO test(tktype,'22232432')
效果如下:
原文链接:https://www.f2er.com/sqlite/201372.html