I generated this error this morning. I was a little bit upset when the error occured. Mostly the error source of this error has been described in the Internet as follows:
Cause: A REFERENCES clause in a CREATE/ALTER TABLE statement gives a column-list for which there is no matching unique or primary key constraint in the referenced table.
Action: Find the correct column names using the ALL_CONS_COLUMNS catalog view
In my case, this error occured when I tried to add a foreign key constraint to a table.Later I found that there did not exist primary key in the referenced table or the column being referenced was not a primary key.
I think the better way to describe this would be to list out all possible reasons like the one I wrote above. Any way, I had to make the referenced column a primary key and it was done the next time!
At the end, you may also be interested in implementing object relational database features like inheritance, member function, collection array, nested table etc. in Oracle illustrated using a simple yet useful ecommerce scenario.
Happy Oracling! Happy programming!!
0 comments:
Post a Comment
Hope you liked this post. You can leave your message or you can put your valuable suggestions on this post here. Thanks for the sharing and cooperation!