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 instant client oracle?
List the various oracle database objects?
How are the index updates?
i want department wise maxmum salary and empolyee name
How to use windows user to connect to the server?
I have a table that log salary-increase-process have fields: autoid, old_salary, acctno and table EMP: acctno, name, salary I want to list count increase-salary of employees, each have old_salary, new_salary. Help me with SELECT statement, please!
can you call insert/update/delete in select statements. If yes how? If no what is the other way?
query to find the maximum no persons with same age(age colomn) from emp table
What is meant by joins?
What is data type in oracle?
find out the second highest salary?
55 Answers Cognizant, Nucsoft, Oracle, TCS, Wondersoft,
What privilege is needed for a user to create views in oracle?