具体怎么写?
建表时创建联合主键
create table test
(
sno char(12),
name char(4),
CONSTRAINT PK_test PRIMARY KEY (sno,name) -- 联合主键
);
建表后加联合主键
alter table tablename add constraint unionkeyname primary key (column1,column2);