Skip to content
Advertisement

(Error) ORA-02270: no matching unique or primary key for this column-list

I have the code below and I’m running it step by step:

But when I create the second and third tables I get the following error:

How do I solve this error and create the tables in this logic? I am saving all primary keys in the registration table and the other tables will only reference it.

Advertisement

Answer

You’ve got your foreign keys backwards. The cod_class and number_rgm columns in registration should be foreign keys referencing the class and alumn tables respectively.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement