sqlite > create table t2 ( ... > id1 int ,... > id2 > col varchar ( 20 ),255)">constraint pk_t2 primary key (id1,id2) ... > ); sqlite > 如果是双主键如下: sqlite> create table t1 ( ...> id int primary key,...> col varchar(20) ...> ); sqlite> create unique index uk_t1 on t1 (col);
sqlite> create table t1 ( ...> id int primary key,...> col varchar(20) ...> ); sqlite> create unique index uk_t1 on t1 (col);