Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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



Hi how Can I Add A Foreign key that references a table that has composit primary key ? example i ..

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

Hi how Can I Add A Foreign key that references a table that has composit primary key ? example i ..

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

Post New Answer

More Oracle General Interview Questions

Is it possible to join two tables, that are in two different users (e.g. SCOTT and HR etc.),but im same database (e.g. ORCL)? If yes, then how it is possible? Explain with step by step procedure.

1 Answers   IBM,


How to define Data Block size ?

2 Answers  


How to update rows in table, suppose i have lacks of rows in table how to update total table with update statement. Can u please any one answer this question with update statement.

2 Answers  


Point the difference between translate and replace?

0 Answers  


How do I limit the number of rows returned by an oracle query after ordering?

0 Answers  


defination of bitmap index

0 Answers   NIIT,


23. Display the client name for all clients who have placed an order where any order line has more than 3 items. Do not use a table join anywhere in your query.

3 Answers   Wipro,


Is there a function to split a string in plsql?

0 Answers  


State all possible different index configurations a table can possibly have?

0 Answers  


How does oracle handle read consistency?

0 Answers  


10. Display the client number, order date and shipping date for all orders where the shipping date is between three and six months after the order date.

3 Answers   Wipro,


What do you mean by merge in oracle?

0 Answers  


Categories
  • Oracle General Interview Questions Oracle General (1809)
  • Oracle DBA (Database Administration) Interview Questions Oracle DBA (Database Administration) (261)
  • Oracle Call Interface (OCI) Interview Questions Oracle Call Interface (OCI) (10)
  • Oracle Architecture Interview Questions Oracle Architecture (90)
  • Oracle Security Interview Questions Oracle Security (38)
  • Oracle Forms Reports Interview Questions Oracle Forms Reports (510)
  • Oracle Data Integrator (ODI) Interview Questions Oracle Data Integrator (ODI) (120)
  • Oracle ETL Interview Questions Oracle ETL (15)
  • Oracle RAC Interview Questions Oracle RAC (93)
  • Oracle D2K Interview Questions Oracle D2K (72)
  • Oracle AllOther Interview Questions Oracle AllOther (241)