在Oracle中使用以下两个表:
Create Table A
( A int, B int, C int,
Constraint pk_ab Primary Key(A, B),
Unique (C)
);
Create Table B
( D int, E int, F int,
Constraint fk_d Foreign Key (D) References A(A),
Constraint fk_e Foreign Key (E) References A(B)
);
Run Code Online (Sandbox Code Playgroud)
为什么这个陈述不起作用?或者更具体地说,为什么它不起作用?我试图创建这种关系的原因是,在将来,我想删除B.D,但保持关系FK_E.
我收到错误:
ORA-02270:此列列表没有匹配的唯一键或主键