Constraint problem
From: Svenn Helge Grindhaug <svenn_at_ii.uib.no>
Date: 2000/05/24
Message-ID: <392B8EAC.BBD746A3_at_ii.uib.no>#1/1
Date: 2000/05/24
Message-ID: <392B8EAC.BBD746A3_at_ii.uib.no>#1/1
I have created the following tables
create table complex (
cacc# number not null primary key,
cname varchar2(40) not null unique,
pre# number,
);
create table c_ref (
cacc# number not null,
ref# number not null,
primary key (cacc#,ref#)
);
Then i want to add the following constraint
SQL> alter table proteincomplex
2 add constraint c_cacc#_fk
3 foreign key (cacc#)
4 references c_ref (cacc#);
But I get the error message: ORA-02270: no matching unique or primary
key for this column-list
Can anyone tell me why and how to solve this problem?
Thanks
Svenn. Received on Wed May 24 2000 - 00:00:00 CEST