我需要创建一个复合主键的前景,但它不能运行。我认为问题是当我引用前景键表时
CREATE TABLE CLEPRIMAIRE
(
aa INT,
bb INT,
CONSTRAINT PK_AA_BB PRIMARY KEY (aa,bb)
);
CREATE TABLE CLEPETRANGERE
(
ee INT,
ff INT,
CONSTRAINT PK_EE PRIMARY KEY (ee),
CONSTRAINT FK_FF FOREIGN KEY (ff) REFERENCES CLEPRIMAIRE(aa,bb)
);
我试着给它编码,但它不工作
Rapport d'erreur -
ORA-02256: le nombre de colonnes de référence doit correspondre au nombre de colonnes référencées
02256. 00000 - "number of referencing columns must match referenced columns"
* Cause: The number of columns in the foreign-key referencing list is not
equal to the number of columns in the referenced list.
* Action: Make sure that the referencing columns match the referenced
columns.
1条答案
按热度按时间cyvaqqii1#
这是你需要的吗?