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

Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL Question: enabling constraints

Re: SQL Question: enabling constraints

From: Dan Clamage <clamage_at_mime.dw.lucent.com>
Date: 1997/10/24
Message-ID: <01bce07c$96d66210$54110b87@clamagent>#1/1

That's because Table2.subcategory isn't the primary key nor a unique key. Define a unique key constraint on Table2.subcategory and you'll be able to enable a foreign key constraint on Table1.subcategory referencing Table2.subcategory.
- djc
Steve Kilcoyne <skil_at_execpc.com> wrote in article <62qg41$6ft$1_at_news.athenet.net>...
> I am trying to enable Primary and Foreign keys on two tables, I have used
> sqlloader to import the data into the tables, but I keep failing (getting
> 2270 errors) on trying to implement the constraints.
> Table1 PK is ID and subcategory.
> Table2 PK is category and subcategory.
> I want to enable a FK on Table1 subcategory to reference Table2
 subcategory,
> but it does not work.
Received on Fri Oct 24 1997 - 00:00:00 CDT

Original text of this message

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