现在的位置: 首页 > 综合 > 正文

sqlite 插入记录注意项

2018年05月17日 ⁄ 综合 ⁄ 共 262字 ⁄ 字号 评论关闭

drop table if exists test;

create table test(

id integer primary key autoincrement,

a int,

b int,

c int

);

insert into test values(null,1,2,3);

insert into test(a,b,c) values(2,3,4);


用 Sqlite Database Browser 执行 sql 语句时老出错,有如下要注意的地方

1)integer 不能缩写为 int

2)主键的关键字为 primary key

3)自增长的关键字为 autoincrement

抱歉!评论已关闭.