|
-
Hi all!
Query!:
1.I have tables BR_Header and BR_details wherein I have
composite Primary key(company_code,Br_NO) belonging to
BR_Header Table and Foreign key(company_code,Br_NO) belonging to BR_details table.Where BR means Bank Receipts.
Now whenever I define foreign Key constraints on BR_details table as Foreign Key(Br_NO),error message flashes saying that no unique or primary key match found.
On the other hand,Composite Foreign Key(company_code,Br_NO) is accepted and says TABLE ALTERED.
Why Oracle doesn't accept constraint Foreign key(Br_NO) defined on Br_details Table compared to constraint Primary Key(company_code,Br_NO).
P.S:On the Br_details Tables,Composite primary Key(Company_code,Br_NO) is also defined wherein the purpose is to define constraint Foreign Key(Br_NO) on the BR_details Table referencing Constraint Primary Key(Company_Code,Br_No)!
Regards,
Amitstora.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|