Title: RE: Syntax for foreign key

Indexes are only automatically created to enforce primary key and unique constraints.
If you want an index to match the columns of a foreign key constraint, you will have to do it separately.
P.S. If you already have a non-unique index on the PK or unique constraint column(s), then Oracle will use that one to enforce the PK or unique constraint.

> -----Original Message-----
> From: DENNIS WILLIAMS [mailto:[EMAIL PROTECTED]]
>
> I'm trying to add a foreign key constraint to a table, and specify the
> tablespace and pctfree. Here is the syntax I'm using:
>
> alter table jobproductoutrigger add (
>    constraint fk_jobprodu_currjobfa_currjobf foreign key (
>      jobnbr, sourcefiscalyear )
>    references currjobfact (jobnbr, sourcefiscalyear)
>    using index tablespace index73
>    pctfree 5)
> /    
>
> This produced the error:
>
> ERROR at line 5:
> ORA-00907: missing right parenthesis
>
> Can someone spot what I'm missing? This is Oracle 8.1.6.

Reply via email to