原文地址:http://blog.163.com/yi_xiaoluo@126/blog/static/72090439201191310569415
1、sqlite支持建立自增主键,sql语句如下:
CREATE TABLE w_user(
id integer primary key autoincrement,
userename varchar(32),
usercname varchar(32),
userpassword varchar(32),
userpermission varchar(32),
userrole varchar(32),
userdesc varchar(32)
);
2、联合主键
在建表时
CREATE TABLE tb_test (
bh varchar(5),
id integer,
primary key (id,bh));