Hi,
 
We are having 3 tables;
1. persons <-- Base table and no data will be inserted in this table.
2. Person1 <-- Inherited table from persons all data will be inserted in this 
table.
3. PersonalInfo  <-- which is storing all personal information of the persons 
and is having the foreign key relationship with the persons table.
 
When we try to insert the data in the personalInfo table it is throwing the 
error stating the primary key does not contain the given value.   But, if I try 
to select from the persons table it is showing the records from its inherited 
tables as well.     Can anybody tell me what might be the problem here?   Or 
else any help regarding the same will be of very much help.
 
Following is the table structure;
---------------------------------------------------------------------
Create Table persons (
name varchar,
age int,
dob varchar,
constraint pKey primary key(name)
);
 create table person1 ( ) inherits(persons);
 
Create table personalInfo (
name varchar,
contact_id int,
contact_addr varchar,
constraint cKey primary key(contact_id),
constraint fKey foreign key(name) references persons(name)
);
--------------------------------------------------------------------------------------------------
 
Thanks In Advance, 
Ramachandra B.S. 



The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email.
 
www.wipro.com

Reply via email to