Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: foreign key missing

Re: foreign key missing

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Thu, 25 Mar 1999 07:24:31 +0100
Message-ID: <36F9D69F.957DCD0@sybrandb.demon.nl>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US