Hi how Can I Add A Foreign key that references a table that
has composit primary key ?
example i had costumer table that has C_Id and SSN Both as
PK and another table has C_Id that must refernece C_Id in
Customers i done the usual way and got oracle error message
about uniqeness any ideas plz
Answer Posted / manish yadav
Problem:I think you are challenging the concept of foriegn
key here, a forign key should be unique or primary key in
the refrenced table,C_ID in your case is part of composite
key i.e. its not primary key itself and nither unique key.
Solution:In customer table you may not want to change
primary key but if possible add unique constraint on C_ID
column. It should work
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
Is oracle a relational database?
What is the difference between postgresql and oracle?
What is the meaning of recursive hints in oracle?
What query tells you how much space a tablespace named test is taking up, and how much space is remaining?
What is a user account in oracle?
Name the various constraints used in oracle?
What is SQL access advisor in Oracle?
What is the difference between formal parameters and actual parameters?
What is the use of oracle?
In what script is snap$ created? In what script is the scott/tiger schema created?
Why cursor variables are easier to use than cursors?
What is rich query?
can anyody please send me the dump for Oracle 10g certifications for DBA path?
How to do a full database export?
What is an oracle user account?