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
What is a lookup table in oracle?
Differentiate between pre-select and pre-query?
How to convert dates to characters in oracle?
How to call a sub procedure?
Is there a combination of "like" and "in" in sql?
Can we store images in oracle database?
Does oracle database need java?
Explain the truncate in oracle?
i have a question here... As of my knowledge, when we apply an index (b-tree)on a column, internally it arranges the data in b-tree format and do the fetching process correspondingly... and my quetion is... How a bit-map index arranges the data internally when applied on a column?IS it in b-tree format or whatelse?
WHAT IS ecc 6.0
How to start a new transaction in oracle?
What is blob datatype?
What is the sql query to concatenate column values from multiple rows in oracle?
What is Reduced List of Values?
What is an index associated with a constraint?