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
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / mrs.priya
try to separate the composite key using str function when
referencing in another function to get only C_ID
| Is This Answer Correct ? | 0 Yes | 0 No |
what is the difference between authorization and authentication?
Is insert autocommit in oracle?
What is using clause and give example?
Do you know about aggregate functions? What is row num function? Can it be used all databases?
1 Answers Bravura Solutions, Cap Gemini,
Can we create index on views?
19 Answers CTS, Syntel, TCS,
Why we choose emp number as primarykey?
What are the restrictions in a oracle read only transaction?
How to define a cusotmer as a supplier in ORACLE R12
Explain table?
What is the implicit cursor in oracle?
Explain the use of consistent option in exp command.
Explain the concept of the DUAL table.