I need to create a foregin to a composite primary key but it dosn't operate. I think the problem is when i reference the foregin key table
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)
);
I tried to code it put it dosn't work
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.