+InsaneNutter MVC Posted January 19, 2009 MVC Share Posted January 19, 2009 (edited) For Oracle am I right in thinking the table which has the primary key must contain all the fields which are in the foreign keys table? Example: if I try and add a foreign key to a table which does not contain all the fields the primary key's table has I get an error: ERROR at line 2: ORA-02298: cannot validate (OPS$mystudentnumber.FK_COURSECODE_CHECK) - parent keys not found After Google'ing I came across this which basically says add the fields from the other table that are missing. Edit – never mind, after removing data from the tables I dont appear to have that problem anymore! Beginners mistake I guess ;) Edited January 20, 2009 by InsaneNutter Link to comment Share on other sites More sharing options...
Question
+InsaneNutter MVC
For Oracle am I right in thinking the table which has the primary key must contain all the fields which are in the foreign keys table?
Example: if I try and add a foreign key to a table which does not contain all the fields the primary key's table has I get an error:
ERROR at line 2: ORA-02298: cannot validate (OPS$mystudentnumber.FK_COURSECODE_CHECK) - parent keys not found
After Google'ing I came across this which basically says add the fields from the other table that are missing.
Edit – never mind, after removing data from the tables I dont appear to have that problem anymore! Beginners mistake I guess ;)
Edited by InsaneNutterLink to comment
Share on other sites
0 answers to this question
Recommended Posts