Unable to reference a composite key as FK

Unable to reference a composite key as FK

 

  

Dear friends,

I have encountered a problem in referencing a member of a composite key as a FK in another table.

table A
c1,c2,c3,c4

tableB
c7,c8,c9

For 'tableA' I have a composite primary key on columns c1+c2.

I wanted to make a relationship(FK) for the 'c7' in 'tableB' with the 'c2' of 'tableA'. But it showed me an error
The columns in 'tableA' do not match an existing primary key or unique constraint

Is this not allowed in relational databases? Somebody pls enlighten me with the concept behind this.

Regards
Kumar
Oracle LazyDBA home page