Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

creating table: foreign key problem

492518Feb 27 2007 — edited Apr 26 2007
I have table1 with col1, col2, col3 making up the primary key. I want to create table2 with col2 a foreign key referencing table1.col2. I get an error when creating the table:
ORA-02270: no matching unique or primary key for this column-list

Is this because the primary key of table1 is made of three columns? How should I be referencing that field then?

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 24 2007
Added on Feb 27 2007
10 comments
1,230 views