Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: foreign key missing
Verify the existence of the primary key on the lumbergroups table. Ifr this
doesn't exist the foreign key on lumbersize will not be created. Also, you
shouldn't include columns names in the references clause, as those are derived
from the primary key on the other table.
Hth,
Sybrand Bakker, Oracle DBA
Gennady wrote:
> I created dependant table SQL script like this:
> CREATE TABLE LumberSizes (
> LSizes number(11),
> LbrGroup Varchar2(30),
> LbrSize Varchar2(30),
> NomThick Number(30,3),
> NomWidth Number(30,3),
> LGroups number(11),
> Constraint FK_LbrGroup_LSizes foreign key(LGroups,LbrGroup) references
> LumberGroups(LGroups,LbrGroup),
> Constraint PK_LSizes primary key(LSizes,LbrGroup,LbrSize)
> )
> Then I execute this script for Personal Oracle 8. Table is created but there
> is no foreign key in it.
> Please, give me a hint to correct the problem.
>
> Gennady
Received on Thu Mar 25 1999 - 00:24:31 CST