create table a
(
id_1 int not null,
id_2 int not null,
text char(20) not null,
constraint Pk_a primary key (id_1 , id_2)
)gocreate table b
(
id_1 int not null,
id_2 int not null,
foreign key (id_1 ,id_2) references a(id_1 , id_2)
)go-- 1 操作
alter table b
add constraint P_1 foreign key (id_1,id_2) references a(id_1,id_2)
on cascade --多了个这个EXEC SP_HELPconstraint B
此时发现有两个约束,请问为什么会出现这种情况
难道每次进行1操作时都需要先用drop删掉之前的约束?