Repost - Constraint - Referencing
Date: 1995/12/08
Message-ID: <30C8B4D5.433A_at_redbird.mtc.ti.com>#1/1
Hi EveryBody,
I'm experiencing some problems referencing a key from another table when
placing a constraint on a column in another table. I have recreated the
problem with some simple tables and the session is logged below.
I will appreciate any help that explains why I am getting the error, I
followed the note's in the Oracle guide - but according to them, this
should work * hah *
Thanks In Advance
SQL> create table aa
Table created.
SQL> describe aa
SQL> alter table aa add primary key(alpha,beta,theta);
Table altered.
SQL> create public synonym aa for aa;
SQL> create table b
( gamma number(10) constraint gamma_fk references aa(alpha))
AA
(alpha number(10),
beta number(10),
theta number(10))
STORAGE (INITIAL 1M
NEXT 500K
MINEXTENTS 1
MAXEXTENTS 10)
PCTFREE 5
PCTUSED 60
tablespace temp;
Name Null? Type
------------------------------- -------- ----
ALPHA NUMBER(10)
BETA NUMBER(10)
THETA NUMBER(10)
Synonym created.
STORAGE (INITIAL 1M
NEXT 500K
MINEXTENTS 1
MAXEXTENTS 10)
PCTFREE 5
PCTUSED 60
tablespace temp;
( gamma number(10) constraint gamma_fk references aa(alpha))
*ERROR at line 2:
ORA-02270: no matching unique or primary key for this column-list Received on Fri Dec 08 1995 - 00:00:00 CET