Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL Question: enabling constraints
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
![]() |
![]() |