第1个回答 2022-06-15
1.创建表时:
create table table_name
(
first_name varchar2(12),
second_name varchar2(10),
idcard varchar(36),
home_name varchar(66),
constraint pk_table_name primary key(first_name,second_name,idcard) -- 联合主键
);
2.创建表之后追加联合主键
alter table table_name add constraint pk_table_name primary key (first_name,second_name);